fix __APPLE__ usage and wrong mv.
This commit is contained in:
parent
9cfd4d8d8b
commit
c03a0d97df
10
os/pl-os.c
10
os/pl-os.c
@ -192,7 +192,7 @@ OsError(void)
|
|||||||
#else /*HAVE_STRERROR*/
|
#else /*HAVE_STRERROR*/
|
||||||
static char errmsg[64];
|
static char errmsg[64];
|
||||||
|
|
||||||
#if defined(__unix__) || defined(__APPLE__)
|
#ifdef __unix__
|
||||||
extern int sys_nerr;
|
extern int sys_nerr;
|
||||||
#if !EMX
|
#if !EMX
|
||||||
extern char *sys_errlist[];
|
extern char *sys_errlist[];
|
||||||
@ -631,7 +631,7 @@ TemporaryFile(const char *id, int *fdp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
retry:
|
retry:
|
||||||
#if defined(__unix__) || defined(__APPLE__)
|
#ifdef __unix__
|
||||||
{ static int MTOK_temp_counter = 0;
|
{ static int MTOK_temp_counter = 0;
|
||||||
const char *sep = id[0] ? "_" : "";
|
const char *sep = id[0] ? "_" : "";
|
||||||
|
|
||||||
@ -773,7 +773,7 @@ OsPath(const char *plpath, char *path)
|
|||||||
}
|
}
|
||||||
#endif /* O_HPFS */
|
#endif /* O_HPFS */
|
||||||
|
|
||||||
#if defined(__unix__) || defined(__APPLE__)
|
#ifdef __unix__
|
||||||
char *
|
char *
|
||||||
PrologPath(const char *p, char *buf, size_t len)
|
PrologPath(const char *p, char *buf, size_t len)
|
||||||
{ strncpy(buf, p, len);
|
{ strncpy(buf, p, len);
|
||||||
@ -2292,7 +2292,7 @@ Unsetenv(char *name)
|
|||||||
an alternative.
|
an alternative.
|
||||||
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||||
|
|
||||||
#if defined(__unix__) || defined(__APPLE__)
|
#if defined(__unix__)
|
||||||
#define SPECIFIC_SYSTEM 1
|
#define SPECIFIC_SYSTEM 1
|
||||||
|
|
||||||
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
@ -2500,7 +2500,7 @@ findExecutable(const char *av0, char *buffer)
|
|||||||
return NULL;
|
return NULL;
|
||||||
file = Which(buf, tmp);
|
file = Which(buf, tmp);
|
||||||
|
|
||||||
#if __unix__ || __APPLE__ /* argv[0] can be an #! script! */
|
#if __unix__ /* argv[0] can be an #! script! */
|
||||||
if ( file )
|
if ( file )
|
||||||
{ int n, fd;
|
{ int n, fd;
|
||||||
char buf[MAXPATHLEN];
|
char buf[MAXPATHLEN];
|
||||||
|
Reference in New Issue
Block a user