diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-07-29 03:08:05 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-07-29 03:08:05 +0000 |
commit | 64578c0589a3a741f81fb55c16eeb882128da00b (patch) | |
tree | 8b650156e44e4d39af8625185d857a88789b8074 /source3/lib/system.c | |
parent | c48b3fce6be6d5d952cbcda0ddae223dda5a576f (diff) | |
download | samba-64578c0589a3a741f81fb55c16eeb882128da00b.tar.gz samba-64578c0589a3a741f81fb55c16eeb882128da00b.tar.xz samba-64578c0589a3a741f81fb55c16eeb882128da00b.zip |
merge from the autoconf2 branch to the main branch
(This used to be commit 3bda7ac417107a7b01d91805ca71c4330657ed21)
Diffstat (limited to 'source3/lib/system.c')
-rw-r--r-- | source3/lib/system.c | 34 |
1 files changed, 21 insertions, 13 deletions
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 } |