Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
ec824329
Commit
ec824329
authored
May 08, 2006
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removing MSDOS defines and code
include/config-win.h: removed reference to MSDOS
parent
d9c1d258
Changes
22
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
26 additions
and
211 deletions
+26
-211
include/config-win.h
include/config-win.h
+1
-1
include/m_string.h
include/m_string.h
+0
-6
include/my_base.h
include/my_base.h
+0
-3
include/my_net.h
include/my_net.h
+2
-2
include/my_nosys.h
include/my_nosys.h
+0
-3
include/my_sys.h
include/my_sys.h
+0
-16
include/my_tree.h
include/my_tree.h
+0
-8
mysys/mf_keycache.c
mysys/mf_keycache.c
+0
-8
mysys/mf_path.c
mysys/mf_path.c
+1
-1
mysys/mf_tempfile.c
mysys/mf_tempfile.c
+1
-1
mysys/my_access.c
mysys/my_access.c
+1
-1
mysys/my_clock.c
mysys/my_clock.c
+1
-1
mysys/my_copy.c
mysys/my_copy.c
+1
-1
mysys/my_create.c
mysys/my_create.c
+1
-8
mysys/my_dup.c
mysys/my_dup.c
+1
-1
mysys/my_gethostbyname.c
mysys/my_gethostbyname.c
+1
-1
mysys/my_getwd.c
mysys/my_getwd.c
+2
-34
mysys/my_init.c
mysys/my_init.c
+1
-1
mysys/my_lib.c
mysys/my_lib.c
+6
-108
mysys/my_net.c
mysys/my_net.c
+2
-2
mysys/my_open.c
mysys/my_open.c
+2
-2
mysys/my_redel.c
mysys/my_redel.c
+2
-2
No files found.
include/config-win.h
View file @
ec824329
...
...
@@ -95,7 +95,7 @@ functions */
#define O_SHORT_LIVED 0
#define SH_DENYNO _SH_DENYNO
#else
#define O_BINARY _O_BINARY
/* compability with
MSDOS
*/
#define O_BINARY _O_BINARY
/* compability with
older style names
*/
#define FILE_BINARY _O_BINARY
/* my_fopen in binary mode */
#define O_TEMPORARY _O_TEMPORARY
#define O_SHORT_LIVED _O_SHORT_LIVED
...
...
include/m_string.h
View file @
ec824329
...
...
@@ -119,12 +119,6 @@ extern char NEAR _dig_vec_lower[];
#define memcpy_fixed(A,B,C) memcpy((A),(B),(C))
#endif
#ifdef MSDOS
#undef bmove_align
#define bmove512(A,B,C) bmove_align(A,B,C)
extern
void
bmove_align
(
gptr
dst
,
const
gptr
src
,
uint
len
);
#endif
#if (!defined(USE_BMOVE512) || defined(HAVE_purify)) && !defined(bmove512)
#define bmove512(A,B,C) memcpy(A,B,C)
#endif
...
...
include/my_base.h
View file @
ec824329
...
...
@@ -33,9 +33,6 @@
#define EOVERFLOW 84
#endif
#ifdef MSDOS
#include <share.h>
/* Neaded for sopen() */
#endif
#if !defined(USE_MY_FUNC) && !defined(THREAD)
#include <my_nosys.h>
/* For faster code, after test */
#endif
/* USE_MY_FUNC */
...
...
include/my_net.h
View file @
ec824329
...
...
@@ -44,7 +44,7 @@ C_MODE_START
#include <sys/ioctl.h>
#endif
#if !defined(
MSDOS) && !defined(
__WIN__) && !defined(HAVE_BROKEN_NETINET_INCLUDES) && !defined(__BEOS__) && !defined(__NETWARE__)
#if !defined(__WIN__) && !defined(HAVE_BROKEN_NETINET_INCLUDES) && !defined(__BEOS__) && !defined(__NETWARE__)
#include <netinet/in_systm.h>
#include <netinet/in.h>
#include <netinet/ip.h>
...
...
@@ -53,7 +53,7 @@ C_MODE_START
#endif
#endif
#if defined(
MSDOS) || defined(
__WIN__)
#if defined(__WIN__)
#define O_NONBLOCK 1
/* For emulation of fcntl() */
#endif
...
...
include/my_nosys.h
View file @
ec824329
...
...
@@ -27,9 +27,6 @@ extern "C" {
#ifndef __MY_NOSYS__
#define __MY_NOSYS__
#ifdef MSDOS
#include <io.h>
/* Get prototypes for read()... */
#endif
#ifndef HAVE_STDLIB_H
#include <malloc.h>
#endif
...
...
include/my_sys.h
View file @
ec824329
...
...
@@ -196,22 +196,6 @@ extern void my_large_free(gptr ptr, myf my_flags);
#define my_afree(PTR) my_free(PTR,MYF(MY_WME))
#endif
/* HAVE_ALLOCA */
#ifdef MSDOS
#ifdef __ZTC__
void
*
__CDECL
halloc
(
long
count
,
size_t
length
);
void
__CDECL
hfree
(
void
*
ptr
);
#endif
#if defined(USE_HALLOC)
#if defined(_VCM_) || defined(M_IC80386)
#undef USE_HALLOC
#endif
#endif
#ifdef USE_HALLOC
#define malloc(a) halloc((long) (a),1)
#define free(a) hfree(a)
#endif
#endif
/* MSDOS */
#ifndef errno
/* did we already get it? */
#ifdef HAVE_ERRNO_AS_DEFINE
#include <errno.h>
/* errno is a define */
...
...
include/my_tree.h
View file @
ec824329
...
...
@@ -40,19 +40,11 @@ typedef int (*tree_walk_action)(void *,element_count,void *);
typedef
enum
{
free_init
,
free_free
,
free_end
}
TREE_FREE
;
typedef
void
(
*
tree_element_free
)(
void
*
,
TREE_FREE
,
void
*
);
#ifdef MSDOS
typedef
struct
st_tree_element
{
struct
st_tree_element
*
left
,
*
right
;
unsigned
long
count
;
uchar
colour
;
/* black is marked as 1 */
}
TREE_ELEMENT
;
#else
typedef
struct
st_tree_element
{
struct
st_tree_element
*
left
,
*
right
;
uint32
count
:
31
,
colour:
1
;
/* black is marked as 1 */
}
TREE_ELEMENT
;
#endif
/* MSDOS */
#define ELEMENT_CHILD(element, offs) (*(TREE_ELEMENT**)((char*)element + offs))
...
...
mysys/mf_keycache.c
View file @
ec824329
...
...
@@ -84,14 +84,6 @@
#define KEYCACHE_DEBUG_LOG "my_key_cache_debug.log"
*/
#if defined(MSDOS) && !defined(M_IC80386)
/* we nead much memory */
#undef my_malloc_lock
#undef my_free_lock
#define my_malloc_lock(A,B) halloc((long) (A/IO_SIZE),IO_SIZE)
#define my_free_lock(A,B) hfree(A)
#endif
/* defined(MSDOS) && !defined(M_IC80386) */
#define STRUCT_PTR(TYPE, MEMBER, a) \
(TYPE *) ((char *) (a) - offsetof(TYPE, MEMBER))
...
...
mysys/mf_path.c
View file @
ec824329
...
...
@@ -73,7 +73,7 @@ my_string my_path(my_string to, const char *progname,
/* test if file without filename is found in path */
/* Returns to if found and to has dirpart if found, else NullS */
#if defined(
MSDOS) || defined(
__WIN__)
#if defined(__WIN__)
#define F_OK 0
#define PATH_SEP ';'
#define PROGRAM_EXTENSION ".exe"
...
...
mysys/mf_tempfile.c
View file @
ec824329
...
...
@@ -24,7 +24,7 @@
#endif
#ifdef HAVE_TEMPNAM
#if !defined(
MSDOS) && !defined(
__NETWARE__)
#if !defined(__NETWARE__)
extern
char
**
environ
;
#endif
#endif
...
...
mysys/my_access.c
View file @
ec824329
...
...
@@ -54,7 +54,7 @@ int my_access(const char *path, int amode)
#endif
/* __WIN__ */
#if defined(
MSDOS) || defined(
__WIN__)
#if defined(__WIN__)
/*
List of file names that causes problem on windows
...
...
mysys/my_clock.c
View file @
ec824329
...
...
@@ -24,7 +24,7 @@
long
my_clock
(
void
)
{
#if !defined(
MSDOS) && !defined(
__WIN__) && !defined(__NETWARE__)
#if !defined(__WIN__) && !defined(__NETWARE__)
struct
tms
tmsbuf
;
VOID
(
times
(
&
tmsbuf
));
return
(
tmsbuf
.
tms_utime
+
tmsbuf
.
tms_stime
);
...
...
mysys/my_copy.c
View file @
ec824329
...
...
@@ -95,7 +95,7 @@ int my_copy(const char *from, const char *to, myf MyFlags)
if
(
MyFlags
&
MY_HOLD_ORIGINAL_MODES
&&
!
new_file_stat
)
DBUG_RETURN
(
0
);
/* File copyed but not stat */
VOID
(
chmod
(
to
,
stat_buff
.
st_mode
&
07777
));
/* Copy modes */
#if !defined(
MSDOS) && !defined(
__WIN__) && !defined(__NETWARE__)
#if !defined(__WIN__) && !defined(__NETWARE__)
VOID
(
chown
(
to
,
stat_buff
.
st_uid
,
stat_buff
.
st_gid
));
/* Copy ownership */
#endif
#if !defined(VMS) && !defined(__ZTC__)
...
...
mysys/my_create.c
View file @
ec824329
...
...
@@ -19,7 +19,7 @@
#include <my_dir.h>
#include "mysys_err.h"
#include <errno.h>
#if defined(
MSDOS) || defined(
__WIN__)
#if defined(__WIN__)
#include <share.h>
#endif
...
...
@@ -47,13 +47,6 @@ File my_create(const char *FileName, int CreateFlags, int access_flags,
#elif defined(VMS)
fd
=
open
((
my_string
)
FileName
,
access_flags
|
O_CREAT
,
0
,
"ctx=stm"
,
"ctx=bin"
);
#elif defined(MSDOS)
if
(
access_flags
&
O_SHARE
)
fd
=
sopen
((
my_string
)
FileName
,
access_flags
|
O_CREAT
|
O_BINARY
,
SH_DENYNO
,
MY_S_IREAD
|
MY_S_IWRITE
);
else
fd
=
open
((
my_string
)
FileName
,
access_flags
|
O_CREAT
|
O_BINARY
,
MY_S_IREAD
|
MY_S_IWRITE
);
#elif defined(__WIN__)
fd
=
my_sopen
((
my_string
)
FileName
,
access_flags
|
O_CREAT
|
O_BINARY
,
SH_DENYNO
,
MY_S_IREAD
|
MY_S_IWRITE
);
...
...
mysys/my_dup.c
View file @
ec824329
...
...
@@ -19,7 +19,7 @@
#include "mysys_err.h"
#include <my_dir.h>
#include <errno.h>
#if defined(
MSDOS) || defined(
__WIN__)
#if defined(__WIN__)
#include <share.h>
#endif
...
...
mysys/my_gethostbyname.c
View file @
ec824329
...
...
@@ -18,7 +18,7 @@
/* Thread safe version of gethostbyname_r() */
#include "mysys_priv.h"
#if !defined(
MSDOS) && !defined(
__WIN__)
#if !defined(__WIN__)
#include <netdb.h>
#endif
#include <my_net.h>
...
...
mysys/my_getwd.c
View file @
ec824329
...
...
@@ -22,7 +22,7 @@
#ifdef HAVE_GETWD
#include <sys/param.h>
#endif
#if defined(
MSDOS) || defined(
__WIN__)
#if defined(__WIN__)
#include <m_ctype.h>
#include <dos.h>
#include <direct.h>
...
...
@@ -39,11 +39,9 @@ int my_getwd(my_string buf, uint size, myf MyFlags)
DBUG_ENTER
(
"my_getwd"
);
DBUG_PRINT
(
"my"
,(
"buf: 0x%lx size: %d MyFlags %d"
,
buf
,
size
,
MyFlags
));
#if ! defined(MSDOS)
if
(
curr_dir
[
0
])
/* Current pos is saved here */
VOID
(
strmake
(
buf
,
&
curr_dir
[
0
],
size
-
1
));
else
#endif
{
#if defined(HAVE_GETCWD)
if
(
!
getcwd
(
buf
,
size
-
2
)
&&
MyFlags
&
MY_WME
)
...
...
@@ -87,43 +85,13 @@ int my_setwd(const char *dir, myf MyFlags)
int
res
;
size_s
length
;
my_string
start
,
pos
;
#if defined(VMS)
|| defined(MSDOS)
#if defined(VMS)
char
buff
[
FN_REFLEN
];
#endif
DBUG_ENTER
(
"my_setwd"
);
DBUG_PRINT
(
"my"
,(
"dir: '%s' MyFlags %d"
,
dir
,
MyFlags
));
start
=
(
my_string
)
dir
;
#if defined(MSDOS)
/* MSDOS chdir can't change drive */
#if !defined(_DDL) && !defined(WIN32)
if
((
pos
=
(
char
*
)
strchr
(
dir
,
FN_DEVCHAR
))
!=
0
)
{
uint
drive
,
drives
;
pos
++
;
/* Skip FN_DEVCHAR */
drive
=
(
uint
)
(
my_toupper
(
&
my_charset_latin1
,
dir
[
0
])
-
'A'
+
1
);
drives
=
(
uint
)
-
1
;
if
((
pos
-
(
byte
*
)
dir
)
==
2
&&
drive
>
0
&&
drive
<
32
)
{
_dos_setdrive
(
drive
,
&
drives
);
_dos_getdrive
(
&
drives
);
}
if
(
drive
!=
drives
)
{
*
pos
=
'\0'
;
/* Dir is now only drive */
my_errno
=
errno
;
my_error
(
EE_SETWD
,
MYF
(
ME_BELL
+
ME_WAITTANG
),
dir
,
ENOENT
);
DBUG_RETURN
(
-
1
);
}
dir
=
pos
;
/* drive changed, change now path */
}
#endif
if
(
*
((
pos
=
strend
(
dir
)
-
1
))
==
FN_LIBCHAR
&&
pos
!=
dir
)
{
strmov
(
buff
,
dir
)[
-
1
]
=
0
;
/* Remove last '/' */
dir
=
buff
;
}
#endif
/* MSDOS*/
if
(
!
dir
[
0
]
||
(
dir
[
0
]
==
FN_LIBCHAR
&&
dir
[
1
]
==
0
))
dir
=
FN_ROOTDIR
;
#ifdef VMS
...
...
mysys/my_init.c
View file @
ec824329
...
...
@@ -183,7 +183,7 @@ Voluntary context switches %ld, Involuntary context switches %ld\n",
rus
.
ru_msgsnd
,
rus
.
ru_msgrcv
,
rus
.
ru_nsignals
,
rus
.
ru_nvcsw
,
rus
.
ru_nivcsw
);
#endif
#if
( defined(MSDOS) || defined(__NETWARE__)
) && !defined(__WIN__)
#if
defined(__NETWARE__
) && !defined(__WIN__)
fprintf
(
info_file
,
"
\n
Run time: %.1f
\n
"
,(
double
)
clock
()
/
CLOCKS_PER_SEC
);
#endif
#if defined(SAFEMALLOC)
...
...
mysys/my_lib.c
View file @
ec824329
...
...
@@ -15,7 +15,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* TODO: check for overun of memory for names. */
/* Convert MSDOS-TIME to standar time_t */
/* Convert MSDOS-TIME to standar time_t
(still needed?)
*/
#define USES_TYPES
/* sys/types is included */
#include "mysys_priv.h"
...
...
@@ -37,7 +37,7 @@
# if defined(HAVE_NDIR_H)
# include <ndir.h>
# endif
# if defined(
MSDOS) || defined(
__WIN__)
# if defined(__WIN__)
# include <dos.h>
# ifdef __BORLANDC__
# include <dir.h>
...
...
@@ -94,7 +94,7 @@ static int comp_names(struct fileinfo *a, struct fileinfo *b)
}
/* comp_names */
#if !defined(
MSDOS) && !defined(
__WIN__)
#if !defined(__WIN__)
MY_DIR
*
my_dir
(
const
char
*
path
,
myf
MyFlags
)
{
...
...
@@ -347,7 +347,7 @@ my_string directory_file_name (my_string dst, const char *src)
#endif
/* VMS */
}
/* directory_file_name */
#el
if defined(WIN32)
#el
se
/*
*****************************************************************************
...
...
@@ -386,7 +386,7 @@ MY_DIR *my_dir(const char *path, myf MyFlags)
*
tmp_file
++=
'.'
;
/* From current dev-dir */
if
(
tmp_file
[
-
1
]
!=
FN_LIBCHAR
)
*
tmp_file
++
=
FN_LIBCHAR
;
tmp_file
[
0
]
=
'*'
;
/*
MSDOS
needs this !??? */
tmp_file
[
0
]
=
'*'
;
/*
Windows
needs this !??? */
tmp_file
[
1
]
=
'.'
;
tmp_file
[
2
]
=
'*'
;
tmp_file
[
3
]
=
'\0'
;
...
...
@@ -509,109 +509,7 @@ error:
DBUG_RETURN
((
MY_DIR
*
)
NULL
);
}
/* my_dir */
#else
/* MSDOS and not WIN32 */
/******************************************************************************
** At MSDOS you always get stat of files, but time is in packed MSDOS-format
******************************************************************************/
MY_DIR
*
my_dir
(
const
char
*
path
,
myf
MyFlags
)
{
char
*
buffer
;
MY_DIR
*
result
=
0
;
FILEINFO
finfo
;
DYNAMIC_ARRAY
*
dir_entries_storage
;
MEM_ROOT
*
names_storage
;
struct
find_t
find
;
ushort
mode
;
char
tmp_path
[
FN_REFLEN
],
*
tmp_file
,
attrib
;
DBUG_ENTER
(
"my_dir"
);
DBUG_PRINT
(
"my"
,(
"path: '%s' stat: %d MyFlags: %d"
,
path
,
MyFlags
));
/* Put LIB-CHAR as last path-character if not there */
tmp_file
=
tmp_path
;
if
(
!*
path
)
*
tmp_file
++
=
'.'
;
/* From current dir */
tmp_file
=
strmov
(
tmp_file
,
path
);
if
(
tmp_file
[
-
1
]
==
FN_DEVCHAR
)
*
tmp_file
++=
'.'
;
/* From current dev-dir */
if
(
tmp_file
[
-
1
]
!=
FN_LIBCHAR
)
*
tmp_file
++
=
FN_LIBCHAR
;
tmp_file
[
0
]
=
'*'
;
/* MSDOS needs this !??? */
tmp_file
[
1
]
=
'.'
;
tmp_file
[
2
]
=
'*'
;
tmp_file
[
3
]
=
'\0'
;
if
(
_dos_findfirst
(
tmp_path
,
_A_NORMAL
|
_A_SUBDIR
,
&
find
))
goto
error
;
if
(
!
(
buffer
=
my_malloc
(
ALIGN_SIZE
(
sizeof
(
MY_DIR
))
+
ALIGN_SIZE
(
sizeof
(
DYNAMIC_ARRAY
))
+
sizeof
(
MEM_ROOT
),
MyFlags
)))
goto
error
;
dir_entries_storage
=
(
DYNAMIC_ARRAY
*
)(
buffer
+
ALIGN_SIZE
(
sizeof
(
MY_DIR
)));
names_storage
=
(
MEM_ROOT
*
)(
buffer
+
ALIGN_SIZE
(
sizeof
(
MY_DIR
))
+
ALIGN_SIZE
(
sizeof
(
DYNAMIC_ARRAY
)));
if
(
my_init_dynamic_array
(
dir_entries_storage
,
sizeof
(
FILEINFO
),
ENTRIES_START_SIZE
,
ENTRIES_INCREMENT
))
{
my_free
((
gptr
)
buffer
,
MYF
(
0
));
goto
error
;
}
init_alloc_root
(
names_storage
,
NAMES_START_SIZE
,
NAMES_START_SIZE
);
/* MY_DIR structure is allocated and completly initialized at this point */
result
=
(
MY_DIR
*
)
buffer
;
do
{
if
(
!
(
finfo
.
name
=
strdup_root
(
names_storage
,
find
.
name
)))
goto
error
;
if
(
MyFlags
&
MY_WANT_STAT
)
{
if
(
!
(
finfo
.
mystat
=
(
MY_STAT
*
)
alloc_root
(
names_storage
,
sizeof
(
MY_STAT
))))
goto
error
;
bzero
(
finfo
.
mystat
,
sizeof
(
MY_STAT
));
finfo
.
mystat
->
st_size
=
find
.
size
;
mode
=
MY_S_IREAD
;
attrib
=
find
.
attrib
;
if
(
!
(
attrib
&
_A_RDONLY
))
mode
|=
MY_S_IWRITE
;
if
(
attrib
&
_A_SUBDIR
)
mode
|=
MY_S_IFDIR
;
finfo
.
mystat
->
st_mode
=
mode
;
finfo
.
mystat
->
st_mtime
=
((
uint32
)
find
.
wr_date
<<
16
)
+
find
.
wr_time
;
}
else
finfo
.
mystat
=
NULL
;
if
(
push_dynamic
(
dir_entries_storage
,
(
gptr
)
&
finfo
))
goto
error
;
}
while
(
_dos_findnext
(
&
find
)
==
0
);
result
->
dir_entry
=
(
FILEINFO
*
)
dir_entries_storage
->
buffer
;
result
->
number_off_files
=
dir_entries_storage
->
elements
;
if
(
!
(
MyFlags
&
MY_DONT_SORT
))
qsort
((
void
*
)
result
->
dir_entry
,
result
->
number_off_files
,
sizeof
(
FILEINFO
),
(
qsort_cmp
)
comp_names
);
DBUG_RETURN
(
result
);
error:
my_dirend
(
result
);
if
(
MyFlags
&
MY_FAE
+
MY_WME
)
my_error
(
EE_DIR
,
MYF
(
ME_BELL
+
ME_WAITTANG
),
path
,
errno
);
DBUG_RETURN
((
MY_DIR
*
)
NULL
);
}
/* my_dir */
#endif
/* WIN32 && MSDOS */
#endif
/* __WIN__ */
/****************************************************************************
** File status
...
...
mysys/my_net.c
View file @
ec824329
...
...
@@ -20,7 +20,7 @@
#include <m_string.h>
/* for thread safe my_inet_ntoa */
#if !defined(
MSDOS) && !defined(
__WIN__)
#if !defined(__WIN__)
#include <netdb.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
...
...
@@ -31,7 +31,7 @@
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
#endif
/* !defined(
MSDOS) && !defined(
__WIN__) */
#endif
/* !defined(__WIN__) */
void
my_inet_ntoa
(
struct
in_addr
in
,
char
*
buf
)
{
...
...
mysys/my_open.c
View file @
ec824329
...
...
@@ -19,7 +19,7 @@
#include "mysys_err.h"
#include <my_dir.h>
#include <errno.h>
#if defined(
MSDOS) || defined(
__WIN__)
#if defined(__WIN__)
#include <share.h>
#endif
...
...
@@ -45,7 +45,7 @@ File my_open(const char *FileName, int Flags, myf MyFlags)
DBUG_ENTER
(
"my_open"
);
DBUG_PRINT
(
"my"
,(
"Name: '%s' Flags: %d MyFlags: %d"
,
FileName
,
Flags
,
MyFlags
));
#if defined(
MSDOS) || defined(
__WIN__)
#if defined(__WIN__)
/*
Check that we don't try to open or create a file name that may
cause problems for us in the future (like PRN)
...
...
mysys/my_redel.c
View file @
ec824329
...
...
@@ -90,14 +90,14 @@ int my_copystat(const char *from, const char *to, int MyFlags)
return
1
;
VOID
(
chmod
(
to
,
statbuf
.
st_mode
&
07777
));
/* Copy modes */
#if !defined(
MSDOS) && !defined(
__WIN__) && !defined(__NETWARE__)
#if !defined(__WIN__) && !defined(__NETWARE__)
if
(
statbuf
.
st_nlink
>
1
&&
MyFlags
&
MY_LINK_WARNING
)
{
if
(
MyFlags
&
MY_LINK_WARNING
)
my_error
(
EE_LINK_WARNING
,
MYF
(
ME_BELL
+
ME_WAITTANG
),
from
,
statbuf
.
st_nlink
);
}
VOID
(
chown
(
to
,
statbuf
.
st_uid
,
statbuf
.
st_gid
));
/* Copy ownership */
#endif
/*
MSDOS
*/
#endif
/*
!__WIN__ && !__NETWARE__
*/
#ifndef VMS
#ifndef __ZTC__
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment