summaryrefslogtreecommitdiffstats
path: root/source/lib/system.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/lib/system.c')
-rw-r--r--source/lib/system.c34
1 files changed, 21 insertions, 13 deletions
diff --git a/source/lib/system.c b/source/lib/system.c
index f453741fdd0..ab65339f6ee 100644
--- a/source/lib/system.c
+++ b/source/lib/system.c
@@ -44,7 +44,7 @@ this replaces the normal select() system call
return if some data has arrived on one of the file descriptors
return -1 means error
********************************************************************/
-#ifdef NO_SELECT
+#ifndef HAVE_SELECT
static int pollfd(int fd)
{
int r=0;
@@ -146,11 +146,11 @@ The wait() calls vary between systems
********************************************************************/
int sys_waitpid(pid_t pid,int *status,int options)
{
-#ifdef USE_WAITPID
+#ifdef HAVE_WAITPID
return waitpid(pid,status,options);
-#else /* USE_WAITPID */
+#else /* HAVE_WAITPID */
return wait4(pid, status, options, NULL);
-#endif /* USE_WAITPID */
+#endif /* HAVE_WAITPID */
}
/*******************************************************************
@@ -343,10 +343,10 @@ for getwd
char *sys_getwd(char *s)
{
char *wd;
-#ifdef USE_GETCWD
- wd = (char *) getcwd (s, sizeof (pstring));
+#ifdef HAVE_GETCWD
+ wd = (char *)getcwd(s, sizeof (pstring));
#else
- wd = (char *) getwd (s);
+ wd = (char *)getwd(s);
#endif
if (wd)
unix_to_dos (wd, True);
@@ -358,10 +358,14 @@ chown isn't used much but OS/2 doesn't have it
********************************************************************/
int sys_chown(char *fname,int uid,int gid)
{
-#ifdef NO_CHOWN
- DEBUG(1,("Warning - chown(%s,%d,%d) not done\n",fname,uid,gid));
+#ifndef HAVE_CHOWN
+ static int done;
+ if (!done) {
+ DEBUG(1,("WARNING: no chown!\n"));
+ done=1;
+ }
#else
- return(chown(fname,uid,gid));
+ return(chown(fname,uid,gid));
#endif
}
@@ -370,10 +374,14 @@ os/2 also doesn't have chroot
********************************************************************/
int sys_chroot(char *dname)
{
-#ifdef NO_CHROOT
- DEBUG(1,("Warning - chroot(%s) not done\n",dname));
+#ifndef HAVE_CHROOT
+ static int done;
+ if (!done) {
+ DEBUG(1,("WARNING: no chroot!\n"));
+ done=1;
+ }
#else
- return(chroot(dname));
+ return(chroot(dname));
#endif
}