This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
# ifndef __intptr_t_defined
typedef __intptr_t intptr_t;
# define __intptr_t_defined
# endif
#endif
# ifndef __intptr_t_defined
typedef __intptr_t intptr_t;
# define __intptr_t_defined
# endif
#endif
# ifndef __socklen_t_defined
typedef __socklen_t socklen_t;
# define __socklen_t_defined
# ifndef __socklen_t_defined
typedef __socklen_t socklen_t;
# define __socklen_t_defined
#define F_OK 0 /* Test for existence. */
/* Test for access to NAME using the real UID and real GID. */
#define F_OK 0 /* Test for existence. */
/* Test for access to NAME using the real UID and real GID. */
/* Test for access to FILE relative to the directory FD is open on.
If AT_EACCESS is set in FLAG, then use effective IDs like `eaccess',
otherwise use real IDs like `access'. */
/* Test for access to FILE relative to the directory FD is open on.
If AT_EACCESS is set in FLAG, then use effective IDs like `eaccess',
otherwise use real IDs like `access'. */
-extern int faccessat (int __fd, __const char *__file, int __type, int __flag)
+extern int faccessat (int __fd, const char *__file, int __type, int __flag)
# define SEEK_SET 0 /* Seek from beginning of file. */
# define SEEK_CUR 1 /* Seek from current position. */
# define SEEK_END 2 /* Seek from end of file. */
# define SEEK_SET 0 /* Seek from beginning of file. */
# define SEEK_CUR 1 /* Seek from current position. */
# define SEEK_END 2 /* Seek from end of file. */
-extern ssize_t pwrite (int __fd, __const void *__buf, size_t __n,
+extern ssize_t pwrite (int __fd, const void *__buf, size_t __n,
__off_t __offset) __wur;
# else
# ifdef __REDIRECT
extern ssize_t __REDIRECT (pread, (int __fd, void *__buf, size_t __nbytes,
__off64_t __offset),
pread64) __wur;
__off_t __offset) __wur;
# else
# ifdef __REDIRECT
extern ssize_t __REDIRECT (pread, (int __fd, void *__buf, size_t __nbytes,
__off64_t __offset),
pread64) __wur;
-extern ssize_t __REDIRECT (pwrite, (int __fd, __const void *__buf,
+extern ssize_t __REDIRECT (pwrite, (int __fd, const void *__buf,
__off64_t __offset) __wur;
/* Write N bytes of BUF to FD at the given position OFFSET without
changing the file pointer. Return the number written, or -1. */
__off64_t __offset) __wur;
/* Write N bytes of BUF to FD at the given position OFFSET without
changing the file pointer. Return the number written, or -1. */
-extern ssize_t pwrite64 (int __fd, __const void *__buf, size_t __n,
+extern ssize_t pwrite64 (int __fd, const void *__buf, size_t __n,
extern unsigned int sleep (unsigned int __seconds);
#if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8) \
extern unsigned int sleep (unsigned int __seconds);
#if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8) \
/* Set an alarm to go off (generating a SIGALRM signal) in VALUE
microseconds. If INTERVAL is nonzero, when the alarm goes off, the
timer is reset to go off every INTERVAL microseconds thereafter.
/* Set an alarm to go off (generating a SIGALRM signal) in VALUE
microseconds. If INTERVAL is nonzero, when the alarm goes off, the
timer is reset to go off every INTERVAL microseconds thereafter.
/* Change the owner and group of the file that FD is open on. */
extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __THROW __wur;
/* Change owner and group of FILE, if it is a symbolic
link the ownership of the symbolic link is changed. */
/* Change the owner and group of the file that FD is open on. */
extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __THROW __wur;
/* Change owner and group of FILE, if it is a symbolic
link the ownership of the symbolic link is changed. */
-extern int fchownat (int __fd, __const char *__file, __uid_t __owner,
+extern int fchownat (int __fd, const char *__file, __uid_t __owner,
__gid_t __group, int __flag)
__THROW __nonnull ((2)) __wur;
#endif /* Use GNU. */
/* Change the process's working directory to PATH. */
__gid_t __group, int __flag)
__THROW __nonnull ((2)) __wur;
#endif /* Use GNU. */
/* Change the process's working directory to PATH. */
/* Change the process's working directory to the one FD is open on. */
extern int fchdir (int __fd) __THROW __wur;
#endif
/* Change the process's working directory to the one FD is open on. */
extern int fchdir (int __fd) __THROW __wur;
#endif
/* Put the absolute pathname of the current working directory in BUF.
If successful, return BUF. If not, put an error message in
BUF and return NULL. BUF should be at least PATH_MAX bytes long. */
/* Put the absolute pathname of the current working directory in BUF.
If successful, return BUF. If not, put an error message in
BUF and return NULL. BUF should be at least PATH_MAX bytes long. */
/* Replace the current process, executing PATH with arguments ARGV and
environment ENVP. ARGV and ENVP are terminated by NULL pointers. */
/* Replace the current process, executing PATH with arguments ARGV and
environment ENVP. ARGV and ENVP are terminated by NULL pointers. */
-extern int execve (__const char *__path, char *__const __argv[],
- char *__const __envp[]) __THROW __nonnull ((1, 2));
+extern int execve (const char *__path, char *const __argv[],
+ char *const __envp[]) __THROW __nonnull ((1, 2));
#ifdef __USE_XOPEN2K8
/* Execute the file FD refers to, overlaying the running program image.
ARGV and ENVP are passed to the new program, as for `execve'. */
#ifdef __USE_XOPEN2K8
/* Execute the file FD refers to, overlaying the running program image.
ARGV and ENVP are passed to the new program, as for `execve'. */
__THROW __nonnull ((1, 2));
/* Execute PATH with all arguments after PATH until a NULL pointer,
and the argument after that for environment. */
__THROW __nonnull ((1, 2));
/* Execute PATH with all arguments after PATH until a NULL pointer,
and the argument after that for environment. */
__THROW __nonnull ((1, 2));
/* Execute PATH with all arguments after PATH until
a NULL pointer and environment from `environ'. */
__THROW __nonnull ((1, 2));
/* Execute PATH with all arguments after PATH until
a NULL pointer and environment from `environ'. */
__THROW __nonnull ((1, 2));
/* Execute FILE, searching in the `PATH' environment variable if it contains
no slashes, with arguments ARGV and environment from `environ'. */
__THROW __nonnull ((1, 2));
/* Execute FILE, searching in the `PATH' environment variable if it contains
no slashes, with arguments ARGV and environment from `environ'. */
__THROW __nonnull ((1, 2));
/* Execute FILE, searching in the `PATH' environment variable if
it contains no slashes, with all arguments after FILE until a
NULL pointer and environment from `environ'. */
__THROW __nonnull ((1, 2));
/* Execute FILE, searching in the `PATH' environment variable if
it contains no slashes, with all arguments after FILE until a
NULL pointer and environment from `environ'. */
__THROW __nonnull ((1, 2));
#ifdef __USE_GNU
/* Execute FILE, searching in the `PATH' environment variable if it contains
no slashes, with arguments ARGV and environment from `environ'. */
__THROW __nonnull ((1, 2));
#ifdef __USE_GNU
/* Execute FILE, searching in the `PATH' environment variable if it contains
no slashes, with arguments ARGV and environment from `environ'. */
-extern int execvpe (__const char *__file, char *__const __argv[],
- char *__const __envp[])
+extern int execvpe (const char *__file, char *const __argv[],
+ char *const __envp[])
If PGID is zero, the process ID of the process is used. */
extern int setpgid (__pid_t __pid, __pid_t __pgid) __THROW;
If PGID is zero, the process ID of the process is used. */
extern int setpgid (__pid_t __pid, __pid_t __pgid) __THROW;
/* Both System V and BSD have `setpgrp' functions, but with different
calling conventions. The BSD function is the same as POSIX.1 `setpgid'
(above). The System V function takes no arguments and puts the calling
/* Both System V and BSD have `setpgrp' functions, but with different
calling conventions. The BSD function is the same as POSIX.1 `setpgid'
(above). The System V function takes no arguments and puts the calling
/* Set the process group ID of the calling process to its own PID.
This is exactly the same as `setpgid (0, 0)'. */
extern int setpgrp (void) __THROW;
/* Set the process group ID of the calling process to its own PID.
This is exactly the same as `setpgid (0, 0)'. */
extern int setpgrp (void) __THROW;
-# else
-
-/* Another name for `setpgid' (above). */
-# ifdef __REDIRECT_NTH
-extern int __REDIRECT_NTH (setpgrp, (__pid_t __pid, __pid_t __pgrp), setpgid);
-# else
-# define setpgrp setpgid
-# endif
-
-# endif /* Favor BSD. */
-#endif /* Use SVID or BSD. */
+#endif /* Use misc or X/Open. */
/* Create a new session with the calling process as its leader.
The process group IDs of the session and the calling process
/* Create a new session with the calling process as its leader.
The process group IDs of the session and the calling process
If the calling process is the super-user, set the real
and effective user IDs, and the saved set-user-ID to UID;
if not, the effective user ID is set to UID. */
If the calling process is the super-user, set the real
and effective user IDs, and the saved set-user-ID to UID;
if not, the effective user ID is set to UID. */
/* Set the real user ID of the calling process to RUID,
and the effective user ID of the calling process to EUID. */
/* Set the real user ID of the calling process to RUID,
and the effective user ID of the calling process to EUID. */
/* Set the group ID of the calling process to GID.
If the calling process is the super-user, set the real
and effective group IDs, and the saved set-group-ID to GID;
if not, the effective group ID is set to GID. */
/* Set the group ID of the calling process to GID.
If the calling process is the super-user, set the real
and effective group IDs, and the saved set-group-ID to GID;
if not, the effective group ID is set to GID. */
/* Set the real group ID of the calling process to RGID,
and the effective group ID of the calling process to EGID. */
/* Set the real group ID of the calling process to RGID,
and the effective group ID of the calling process to EGID. */
#ifdef __USE_GNU
/* Fetch the real user ID, effective user ID, and saved-set user ID,
#ifdef __USE_GNU
/* Fetch the real user ID, effective user ID, and saved-set user ID,
/* Set the real user ID, effective user ID, and saved-set user ID,
of the calling process to RUID, EUID, and SUID, respectively. */
extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid)
/* Set the real user ID, effective user ID, and saved-set user ID,
of the calling process to RUID, EUID, and SUID, respectively. */
extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid)
/* Set the real group ID, effective group ID, and saved-set group ID,
of the calling process to RGID, EGID, and SGID, respectively. */
extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid)
/* Set the real group ID, effective group ID, and saved-set group ID,
of the calling process to RGID, EGID, and SGID, respectively. */
extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid)
#endif
/* Clone the calling process, creating an exact copy.
Return -1 for errors, 0 to the new process,
and the process ID of the new process to the old process. */
#endif
/* Clone the calling process, creating an exact copy.
Return -1 for errors, 0 to the new process,
and the process ID of the new process to the old process. */
/* Clone the calling process, but without copying the whole address space.
The calling process is suspended until the new process exits or is
replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
and the process ID of the new process to the old process. */
extern __pid_t vfork (void) __THROW;
/* Clone the calling process, but without copying the whole address space.
The calling process is suspended until the new process exits or is
replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
and the process ID of the new process to the old process. */
extern __pid_t vfork (void) __THROW;
with a terminal, zero if not. */
extern int isatty (int __fd) __THROW;
with a terminal, zero if not. */
extern int isatty (int __fd) __THROW;
|| (defined __USE_XOPEN_EXTENDED && !defined __USE_UNIX98)
/* Return the index into the active-logins file (utmp) for
the controlling terminal. */
|| (defined __USE_XOPEN_EXTENDED && !defined __USE_UNIX98)
/* Return the index into the active-logins file (utmp) for
the controlling terminal. */
__THROW __nonnull ((1, 2)) __wur;
#ifdef __USE_ATFILE
/* Like link but relative paths in TO and FROM are interpreted relative
to FROMFD and TOFD respectively. */
__THROW __nonnull ((1, 2)) __wur;
#ifdef __USE_ATFILE
/* Like link but relative paths in TO and FROM are interpreted relative
to FROMFD and TOFD respectively. */
-extern int linkat (int __fromfd, __const char *__from, int __tofd,
- __const char *__to, int __flags)
+extern int linkat (int __fromfd, const char *__from, int __tofd,
+ const char *__to, int __flags)
__THROW __nonnull ((1, 2)) __wur;
/* Read the contents of the symbolic link PATH into no more than
LEN bytes of BUF. The contents are not null-terminated.
Returns the number of characters read, or -1 for errors. */
__THROW __nonnull ((1, 2)) __wur;
/* Read the contents of the symbolic link PATH into no more than
LEN bytes of BUF. The contents are not null-terminated.
Returns the number of characters read, or -1 for errors. */
char *__restrict __buf, size_t __len)
__THROW __nonnull ((1, 2)) __wur;
char *__restrict __buf, size_t __len)
__THROW __nonnull ((1, 2)) __wur;
-extern int symlinkat (__const char *__from, int __tofd,
- __const char *__to) __THROW __nonnull ((1, 3)) __wur;
+extern int symlinkat (const char *__from, int __tofd,
+ const char *__to) __THROW __nonnull ((1, 3)) __wur;
char *__restrict __buf, size_t __len)
__THROW __nonnull ((2, 3)) __wur;
#endif
/* Remove the link NAME. */
char *__restrict __buf, size_t __len)
__THROW __nonnull ((2, 3)) __wur;
#endif
/* Remove the link NAME. */
If it cannot be determined or some other error occurred, return the error
code. Otherwise return 0.
If it cannot be determined or some other error occurred, return the error
code. Otherwise return 0.
/* 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
name and the terminator. */
/* 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
name and the terminator. */
/* Set the name of the current host to NAME, which is LEN bytes long.
This call is restricted to the super-user. */
/* Set the name of the current host to NAME, which is LEN bytes long.
This call is restricted to the super-user. */
The NIS domain name is usually the empty string when not using NIS. */
extern int getdomainname (char *__name, size_t __len)
__THROW __nonnull ((1)) __wur;
The NIS domain name is usually the empty string when not using NIS. */
extern int getdomainname (char *__name, size_t __len)
__THROW __nonnull ((1)) __wur;
extern int vhangup (void) __THROW;
/* Revoke the access of all descriptors currently open on FILE. */
extern int vhangup (void) __THROW;
/* Revoke the access of all descriptors currently open on FILE. */
/* Turn accounting on if NAME is an existing file. The system will then write
a record for each process as it terminates, to this file. If NAME is NULL,
turn accounting off. This call is restricted to the super-user. */
/* Turn accounting on if NAME is an existing file. The system will then write
a record for each process as it terminates, to this file. If NAME is NULL,
turn accounting off. This call is restricted to the super-user. */
terminal. If NOCHDIR is zero, do `chdir ("/")'. If NOCLOSE is zero,
redirects stdin, stdout, and stderr to /dev/null. */
extern int daemon (int __nochdir, int __noclose) __THROW __wur;
terminal. If NOCHDIR is zero, do `chdir ("/")'. If NOCLOSE is zero,
redirects stdin, stdout, and stderr to /dev/null. */
extern int daemon (int __nochdir, int __noclose) __THROW __wur;
/* Make PATH be the root directory (the starting point for absolute paths).
This call is restricted to the super-user. */
/* Make PATH be the root directory (the starting point for absolute paths).
This call is restricted to the super-user. */
/* Prompt with PROMPT and read a string from the terminal without echoing.
Uses /dev/tty if possible; otherwise stderr and stdin. */
/* Prompt with PROMPT and read a string from the terminal without echoing.
Uses /dev/tty if possible; otherwise stderr and stdin. */
/* Make all changes done to FD actually appear on disk.
This function is a cancellation point and therefore not marked with
__THROW. */
extern int fsync (int __fd);
/* Make all changes done to FD actually appear on disk.
This function is a cancellation point and therefore not marked with
__THROW. */
extern int fsync (int __fd);
-#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
+#ifdef __USE_GNU
+/* Make all changes done to all files on the file system associated
+ with FD actually appear on disk. */
+extern int syncfs (int __fd) __THROW;
+#endif
+
+
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
/* Return the number of bytes in a page. This is the system's page size,
which is not necessarily the same as the hardware page size. */
extern int getpagesize (void) __THROW __attribute__ ((__const__));
/* Return the number of bytes in a page. This is the system's page size,
which is not necessarily the same as the hardware page size. */
extern int getpagesize (void) __THROW __attribute__ ((__const__));
__THROW __nonnull ((1)) __wur;
# else
# ifdef __REDIRECT_NTH
extern int __REDIRECT_NTH (truncate,
__THROW __nonnull ((1)) __wur;
# else
# ifdef __REDIRECT_NTH
extern int __REDIRECT_NTH (truncate,
truncate64) __nonnull ((1)) __wur;
# else
# define truncate truncate64
# endif
# endif
# ifdef __USE_LARGEFILE64
truncate64) __nonnull ((1)) __wur;
# else
# define truncate truncate64
# endif
# endif
# ifdef __USE_LARGEFILE64
__THROW __nonnull ((1, 2));
/* Encrypt data in BLOCK in place if EDFLAG is zero; otherwise decrypt
block in place. */
__THROW __nonnull ((1, 2));
/* Encrypt data in BLOCK in place if EDFLAG is zero; otherwise decrypt
block in place. */
/* Swab pairs bytes in the first N bytes of the area pointed to by
FROM and copy the result to TO. The value of TO must not be in the
range [FROM - N + 1, FROM - 1]. If N is odd the first byte in FROM
is without partner. */
/* Swab pairs bytes in the first N bytes of the area pointed to by
FROM and copy the result to TO. The value of TO must not be in the
range [FROM - N + 1, FROM - 1]. If N is odd the first byte in FROM
is without partner. */
ssize_t __n) __THROW __nonnull ((1, 2));
#endif
/* The Single Unix specification demands this prototype to be here.
It is also found in <stdio.h>. */
ssize_t __n) __THROW __nonnull ((1, 2));
#endif
/* The Single Unix specification demands this prototype to be here.
It is also found in <stdio.h>. */
/* Return the name of the controlling terminal. */
extern char *ctermid (char *__s) __THROW;
#endif
/* Define some macros helping to catch buffer overflows. */
/* Return the name of the controlling terminal. */
extern char *ctermid (char *__s) __THROW;
#endif
/* Define some macros helping to catch buffer overflows. */