From 64578c0589a3a741f81fb55c16eeb882128da00b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 29 Jul 1998 03:08:05 +0000 Subject: merge from the autoconf2 branch to the main branch (This used to be commit 3bda7ac417107a7b01d91805ca71c4330657ed21) --- source3/lib/system.c | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) (limited to 'source3/lib/system.c') diff --git a/source3/lib/system.c b/source3/lib/system.c index f453741fdd..ab65339f6e 100644 --- a/source3/lib/system.c +++ b/source3/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 } -- cgit