+2008-11-18 Jeff Johnston <jjohnstn@redhat.com>
+
+ * libc/unix/basename.c: Add !_NO_BASENAME flag check so code can be
+ ignored if desired by a platform.
+ * libc/unix/dirname.c: Ditto except replace BASENAME with file name.
+ * libc/unix/getcwd.c: Ditto.
+ * libc/unix/getlogin.c: Ditto.
+ * libc/unix/getpass.c: Ditto.
+ * libc/unix/getpwent.c: Ditto.
+ * libc/unix/getut.c: Ditto.
+ * libc/unix/pread.c: Ditto.
+ * libc/unix/pwrite.c: Ditto.
+ * libc/unix/sigset.c: Ditto.
+
2008-11-18 Craig Howland <howland@LGSInnovations.com>
* libc/unix/ttyname.c: Add ttyname_r and change ttyname to use
+#ifndef _NO_BASENAME
/* Copyright 2005 Shaun Jackman
* Permission to use, copy, modify, and distribute this software
* is freely granted, provided that this notice is preserved.
p--;
return p + 1;
}
+
+#endif /* !_NO_BASENAME */
+#ifndef _NO_DIRNAME
+
/* Copyright 2005 Shaun Jackman
* Permission to use, copy, modify, and distribute this software
* is freely granted, provided that this notice is preserved.
p == path ? "/" :
(*p = '\0', path);
}
+
+#endif /* !_NO_DIRNAME */
+#ifndef _NO_GETCWD
/*
* Copyright (c) 1989, 1991 The Regents of the University of California.
* All rights reserved.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
}
#endif /* _REENT_ONLY */
+#endif /* !_NO_GETCWD */
+#ifndef _NO_GETLOGIN
+
#include <string.h>
#include <unistd.h>
#include <sys/types.h>
close (utmp_fd);
return 0;
}
+#endif /* !_NO_GETLOGIN */
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
+#ifndef _NO_GETPWENT
+
#include <stdio.h>
#include <sys/types.h>
#include <pwd.h>
if (passwd_fp != NULL)
fclose (passwd_fp);
}
+
+#endif /* !_NO_GETPWENT */
+#ifndef _NO_GETUT
+
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
return 0;
}
+
+#endif /* !_NO_GETUT */
+#ifndef _NO_PREAD
/*
FUNCTION
<<pread>>---read a file from specified position
return _pread_r (_REENT, fd, buf, n, off);
}
-#endif
+#endif /* !_REENT_ONLY */
+#endif /* !_NO_PREAD */
+#ifndef _NO_PWRITE
/*
FUNCTION
<<pwrite>>---write a file from specified position
return _pwrite_r (_REENT, fd, buf, n, off);
}
-#endif
+#endif /* !_REENT_ONLY */
+#endif /* !_NO_PWRITE */
+#ifndef _NO_SIGSET
+
#include <signal.h>
#include <errno.h>
}
#endif /* SIG_SETMASK */
+#endif /* _NO_SIGSET */