Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/include/sys/unistd.h')
-rw-r--r--newlib/libc/include/sys/unistd.h95
1 files changed, 11 insertions, 84 deletions
diff --git a/newlib/libc/include/sys/unistd.h b/newlib/libc/include/sys/unistd.h
index a670dd735..d7e46a7ec 100644
--- a/newlib/libc/include/sys/unistd.h
+++ b/newlib/libc/include/sys/unistd.h
@@ -20,18 +20,13 @@ int _EXFUN(access,(const char *__path, int __amode ));
unsigned _EXFUN(alarm, (unsigned __secs ));
int _EXFUN(chdir, (const char *__path ));
int _EXFUN(chmod, (const char *__path, mode_t __mode ));
-#if !defined(__INSIDE_CYGWIN__)
int _EXFUN(chown, (const char *__path, uid_t __owner, gid_t __group ));
-#endif
#if defined(__CYGWIN__) || defined(__rtems__)
int _EXFUN(chroot, (const char *__path ));
#endif
int _EXFUN(close, (int __fildes ));
char _EXFUN(*ctermid, (char *__s ));
char _EXFUN(*cuserid, (char *__s ));
-#if defined(__CYGWIN__)
-int _EXFUN(daemon, (int nochdir, int noclose));
-#endif
int _EXFUN(dup, (int __fildes ));
int _EXFUN(dup2, (int __fildes, int __fildes2 ));
#if defined(__CYGWIN__)
@@ -47,97 +42,64 @@ int _EXFUN(execvp, (const char *__file, char * const __argv[] ));
int _EXFUN(fchdir, (int __fildes));
#endif
int _EXFUN(fchmod, (int __fildes, mode_t __mode ));
-#if !defined(__INSIDE_CYGWIN__)
int _EXFUN(fchown, (int __fildes, uid_t __owner, gid_t __group ));
-#endif
pid_t _EXFUN(fork, (void ));
long _EXFUN(fpathconf, (int __fd, int __name ));
int _EXFUN(fsync, (int __fd));
-int _EXFUN(fdatasync, (int __fd));
char _EXFUN(*getcwd, (char *__buf, size_t __size ));
-#if defined(__CYGWIN__)
-int _EXFUN(getdomainname ,(char *__name, size_t __len));
-#endif
-#if !defined(__INSIDE_CYGWIN__)
gid_t _EXFUN(getegid, (void ));
uid_t _EXFUN(geteuid, (void ));
gid_t _EXFUN(getgid, (void ));
-#endif
int _EXFUN(getgroups, (int __gidsetsize, gid_t __grouplist[] ));
-#if defined(__CYGWIN__)
-long _EXFUN(gethostid, (void));
-#endif
char _EXFUN(*getlogin, (void ));
#if defined(_POSIX_THREAD_SAFE_FUNCTIONS)
int _EXFUN(getlogin_r, (char *name, size_t namesize) );
#endif
-char _EXFUN(*getpass, (const char *__prompt));
+char _EXFUN(*getpass, (__const char *__prompt));
size_t _EXFUN(getpagesize, (void));
-#if defined(__CYGWIN__)
-int _EXFUN(getpeereid, (int, uid_t *, gid_t *));
-#endif
pid_t _EXFUN(getpgid, (pid_t));
pid_t _EXFUN(getpgrp, (void ));
pid_t _EXFUN(getpid, (void ));
pid_t _EXFUN(getppid, (void ));
-#ifdef __CYGWIN__
-pid_t _EXFUN(getsid, (pid_t));
-#endif
-#if !defined(__INSIDE_CYGWIN__)
uid_t _EXFUN(getuid, (void ));
-#endif
#ifdef __CYGWIN__
char * _EXFUN(getusershell, (void));
char _EXFUN(*getwd, (char *__buf ));
int _EXFUN(iruserok, (unsigned long raddr, int superuser, const char *ruser, const char *luser));
#endif
int _EXFUN(isatty, (int __fildes ));
-#if !defined(__INSIDE_CYGWIN__)
int _EXFUN(lchown, (const char *__path, uid_t __owner, gid_t __group ));
-#endif
int _EXFUN(link, (const char *__path1, const char *__path2 ));
int _EXFUN(nice, (int __nice_value ));
-#if !defined(__INSIDE_CYGWIN__)
off_t _EXFUN(lseek, (int __fildes, off_t __offset, int __whence ));
-#endif
long _EXFUN(pathconf, (const char *__path, int __name ));
int _EXFUN(pause, (void ));
#ifdef __CYGWIN__
int _EXFUN(pthread_atfork, (void (*)(void), void (*)(void), void (*)(void)));
#endif
int _EXFUN(pipe, (int __fildes[2] ));
-ssize_t _EXFUN(pread, (int __fd, void *__buf, size_t __nbytes, off_t __offset));
-ssize_t _EXFUN(pwrite, (int __fd, const void *__buf, size_t __nbytes, off_t __offset));
_READ_WRITE_RETURN_TYPE _EXFUN(read, (int __fd, void *__buf, size_t __nbyte ));
#if defined(__CYGWIN__)
-int _EXFUN(rresvport, (int *__alport));
-int _EXFUN(revoke, (char *__path));
+int _EXFUN(revoke, (char *path));
#endif
int _EXFUN(rmdir, (const char *__path ));
#if defined(__CYGWIN__)
int _EXFUN(ruserok, (const char *rhost, int superuser, const char *ruser, const char *luser));
#endif
+#if defined(__rtems__)
void * _EXFUN(sbrk, (ptrdiff_t __incr));
-#if !defined(__INSIDE_CYGWIN__)
+#else
+void * _EXFUN(sbrk, (size_t __incr));
+#endif
#if defined(__CYGWIN__)
int _EXFUN(setegid, (gid_t __gid ));
int _EXFUN(seteuid, (uid_t __uid ));
#endif
int _EXFUN(setgid, (gid_t __gid ));
-#endif
-#if defined(__CYGWIN__)
-int _EXFUN(setgroups, (int ngroups, const gid_t *grouplist ));
-#endif
int _EXFUN(setpgid, (pid_t __pid, pid_t __pgid ));
int _EXFUN(setpgrp, (void ));
-#if defined(__CYGWIN__) && !defined(__INSIDE_CYGWIN__)
-int _EXFUN(setregid, (gid_t __rgid, gid_t __egid));
-int _EXFUN(setreuid, (uid_t __ruid, uid_t __euid));
-#endif
pid_t _EXFUN(setsid, (void ));
-#if !defined(__INSIDE_CYGWIN__)
int _EXFUN(setuid, (uid_t __uid ));
-#endif
#if defined(__CYGWIN__)
void _EXFUN(setusershell, (void));
#endif
@@ -147,73 +109,43 @@ long _EXFUN(sysconf, (int __name ));
pid_t _EXFUN(tcgetpgrp, (int __fildes ));
int _EXFUN(tcsetpgrp, (int __fildes, pid_t __pgrp_id ));
char _EXFUN(*ttyname, (int __fildes ));
-#if defined(__CYGWIN__)
-int _EXFUN(ttyname_r, (int, char *, size_t));
-#endif
int _EXFUN(unlink, (const char *__path ));
int _EXFUN(vhangup, (void ));
_READ_WRITE_RETURN_TYPE _EXFUN(write, (int __fd, const void *__buf, size_t __nbyte ));
-#ifdef __CYGWIN__
-# define __UNISTD_GETOPT__
-# include <getopt.h>
-# undef __UNISTD_GETOPT__
-#else
-extern char *optarg; /* getopt(3) external variables */
-extern int optind, opterr, optopt;
-int getopt(int, char * const [], const char *);
-extern int optreset; /* getopt(3) external variable */
-#endif
-
#ifndef _POSIX_SOURCE
pid_t _EXFUN(vfork, (void ));
-
-extern char *suboptarg; /* getsubopt(3) external variable */
-int getsubopt(char **, char * const *, char **);
#endif /* _POSIX_SOURCE */
-#ifdef _COMPILING_NEWLIB
/* Provide prototypes for most of the _<systemcall> names that are
provided in newlib for some compilers. */
int _EXFUN(_close, (int __fildes ));
pid_t _EXFUN(_fork, (void ));
pid_t _EXFUN(_getpid, (void ));
int _EXFUN(_link, (const char *__path1, const char *__path2 ));
-_off_t _EXFUN(_lseek, (int __fildes, _off_t __offset, int __whence ));
-#ifdef __LARGE64_FILES
-_off64_t _EXFUN(_lseek64, (int __filedes, _off64_t __offset, int __whence ));
-#endif
+off_t _EXFUN(_lseek, (int __fildes, off_t __offset, int __whence ));
_READ_WRITE_RETURN_TYPE _EXFUN(_read, (int __fd, void *__buf, size_t __nbyte ));
-void * _EXFUN(_sbrk, (ptrdiff_t __incr));
+void * _EXFUN(_sbrk, (size_t __incr));
int _EXFUN(_unlink, (const char *__path ));
_READ_WRITE_RETURN_TYPE _EXFUN(_write, (int __fd, const void *__buf, size_t __nbyte ));
int _EXFUN(_execve, (const char *__path, char * const __argv[], char * const __envp[] ));
-#endif
-#if defined(__CYGWIN__) || defined(__rtems__) || defined(__sh__)
-#if !defined(__INSIDE_CYGWIN__)
-int _EXFUN(ftruncate, (int __fd, off_t __length));
-int _EXFUN(truncate, (const char *, off_t __length));
-#endif
-#endif
#if defined(__CYGWIN__) || defined(__rtems__)
int _EXFUN(getdtablesize, (void));
int _EXFUN(setdtablesize, (int));
useconds_t _EXFUN(ualarm, (useconds_t __useconds, useconds_t __interval));
unsigned _EXFUN(usleep, (unsigned int __useconds));
+int _EXFUN(ftruncate, (int __fd, off_t __length));
+int _EXFUN(truncate, (const char *, off_t __length));
#if !(defined (_WINSOCK_H) || defined (__USE_W32_SOCKETS))
/* winsock[2].h defines as __stdcall, and with int as 2nd arg */
int _EXFUN(gethostname, (char *__name, size_t __len));
#endif
char * _EXFUN(mktemp, (char *));
-#if defined(__CYGWIN__)
-void _EXFUN(sync, (void));
-#else /* defined(__rtems__) */
int _EXFUN(sync, (void));
-#endif
-#endif
int _EXFUN(readlink, (const char *__path, char *__buf, int __buflen));
int _EXFUN(symlink, (const char *__name1, const char *__name2));
+#endif
#define F_OK 0
#define R_OK 4
@@ -302,11 +234,6 @@ int _EXFUN(symlink, (const char *__name1, const char *__name2));
#define _SC_GETPW_R_SIZE_MAX 51
#define _SC_LOGIN_NAME_MAX 52
#define _SC_THREAD_DESTRUCTOR_ITERATIONS 53
-
-#if !defined(__CYGWIN__) && !defined(__rtems__)
-#define _SC_STREAM_MAX 100
-#define _SC_PRIORITY_SCHEDULING 101
-#endif
# define _PC_LINK_MAX 0
# define _PC_MAX_CANON 1