about summary refs log tree commit diff
path: root/posix
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-01-25 19:35:30 +0000
committerUlrich Drepper <drepper@redhat.com>2001-01-25 19:35:30 +0000
commitd921b30445e8dfc6d9dddf030383a6227b21ea0d (patch)
tree4fdda901830b4e0e7ae10a77c3c522b39da72ca3 /posix
parent2eba94b2cb9180ea3e323ba17434b64cd5b632a5 (diff)
downloadglibc-d921b30445e8dfc6d9dddf030383a6227b21ea0d.tar.gz
glibc-d921b30445e8dfc6d9dddf030383a6227b21ea0d.tar.xz
glibc-d921b30445e8dfc6d9dddf030383a6227b21ea0d.zip
Update.
	* posix/unistd.h: Make functions removed in XPG6 not available if
	__USE_XOPEN2K.
Diffstat (limited to 'posix')
-rw-r--r--posix/unistd.h66
1 files changed, 36 insertions, 30 deletions
diff --git a/posix/unistd.h b/posix/unistd.h
index e72553dc0d..809e87a540 100644
--- a/posix/unistd.h
+++ b/posix/unistd.h
@@ -667,7 +667,8 @@ extern int ttyname_r (int __fd, char *__buf, size_t __buflen) __THROW;
    with a terminal, zero if not.  */
 extern int isatty (int __fd) __THROW;
 
-#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
+#if defined __USE_BSD \
+    || (defined __USE_XOPEN_EXTENDED && !defined __USE_UNIX98)
 /* Return the index into the active-logins file (utmp) for
    the controlling terminal.  */
 extern int ttyslot (void) __THROW;
@@ -726,7 +727,7 @@ extern int setlogin (__const char *__name) __THROW;
 #endif
 
 
-#if defined __USE_BSD || defined __USE_XOPEN
+#if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_UNIX98)
 
 /* Put the name of the current host in no more than LEN bytes of NAME.
    The result is null-terminated if LEN is large enough for the full
@@ -749,10 +750,6 @@ extern int getdomainname (char *__name, size_t __len) __THROW;
 extern int setdomainname (__const char *__name, size_t __len) __THROW;
 
 
-/* Make all changes done to FD actually appear on disk.  */
-extern int fsync (int __fd) __THROW;
-
-
 /* Revoke access permissions to all processes currently communicating
    with the control terminal, and then send a SIGHUP signal to the process
    group of the control terminal.  */
@@ -776,10 +773,6 @@ extern int profil (unsigned short int *__sample_buffer, size_t __size,
    turn accounting off.  This call is restricted to the super-user.  */
 extern int acct (__const char *__name) __THROW;
 
-/* Make PATH be the root directory (the starting point for absolute paths).
-   This call is restricted to the super-user.  */
-extern int chroot (__const char *__path) __THROW;
-
 
 /* Successive calls return the shells listed in `/etc/shells'.  */
 extern char *getusershell (void) __THROW;
@@ -787,10 +780,6 @@ extern void endusershell (void) __THROW; /* Discard cached info.  */
 extern void setusershell (void) __THROW; /* Rewind and re-read the file.  */
 
 
-/* Prompt with PROMPT and read a string from the terminal without echoing.
-   Uses /dev/tty if possible; otherwise stderr and stdin.  */
-extern char *getpass (__const char *__prompt) __THROW;
-
 /* Put the program in the background, and dissociate from the controlling
    terminal.  If NOCHDIR is zero, do `chdir ("/")'.  If NOCLOSE is zero,
    redirects stdin, stdout, and stderr to /dev/null.  */
@@ -799,6 +788,23 @@ extern int daemon (int __nochdir, int __noclose) __THROW;
 #endif /* Use BSD || X/Open.  */
 
 
+#if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
+/* Make PATH be the root directory (the starting point for absolute paths).
+   This call is restricted to the super-user.  */
+extern int chroot (__const char *__path) __THROW;
+
+/* Prompt with PROMPT and read a string from the terminal without echoing.
+   Uses /dev/tty if possible; otherwise stderr and stdin.  */
+extern char *getpass (__const char *__prompt) __THROW;
+#endif /* Use BSD || X/Open.  */
+
+
+#if defined __USE_BSD || defined __USE_XOPEN
+/* Make all changes done to FD actually appear on disk.  */
+extern int fsync (int __fd) __THROW;
+#endif /* Use BSD || X/Open.  */
+
+
 #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
 
 /* Return the current machine's Internet number.  */
@@ -814,35 +820,35 @@ extern int getpagesize (void)  __THROW __attribute__ ((__const__));
 
 
 /* Truncate FILE to LENGTH bytes.  */
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
 extern int truncate (__const char *__file, __off_t __length) __THROW;
-#else
-# ifdef __REDIRECT
+# else
+#  ifdef __REDIRECT
 extern int __REDIRECT (truncate,
 		       (__const char *__file, __off64_t __length) __THROW,
 		       truncate64);
-# else
-#  define truncate truncate64
+#  else
+#   define truncate truncate64
+#  endif
 # endif
-#endif
-#ifdef __USE_LARGEFILE64
+# ifdef __USE_LARGEFILE64
 extern int truncate64 (__const char *__file, __off64_t __length) __THROW;
-#endif
+# endif
 
 /* Truncate the file FD is open on to LENGTH bytes.  */
-#ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
 extern int ftruncate (int __fd, __off_t __length) __THROW;
-#else
-# ifdef __REDIRECT
+# else
+#  ifdef __REDIRECT
 extern int __REDIRECT (ftruncate, (int __fd, __off64_t __length) __THROW,
 		       ftruncate64);
-# else
-#  define ftruncate ftruncate64
+#  else
+#   define ftruncate ftruncate64
+#  endif
 # endif
-#endif
-#ifdef __USE_LARGEFILE64
+# ifdef __USE_LARGEFILE64
 extern int ftruncate64 (int __fd, __off64_t __length) __THROW;
-#endif
+# endif
 
 
 /* Return the maximum number of file descriptors