Search
lxdream.org :: lxdream/test/include/sys/unistd.h
lxdream 0.9.1
released Jun 29
Download Now
filename test/include/sys/unistd.h
changeset 185:6755a04c447f
author nkeynes
date Fri Feb 08 00:06:56 2008 +0000 (16 years ago)
permissions -rw-r--r--
last change Fix LDS/STS to FPUL/FPSCR to check the FPU disabled bit. Fixes
the linux 2.4.0-test8 kernel boot
(this wasn't exactly very well documented in the original manual)
view annotate diff log raw
     1 #ifndef _SYS_UNISTD_H
     2 #define _SYS_UNISTD_H
     4 #ifdef __cplusplus
     5 extern "C" {
     6 #endif
     8 #include <_ansi.h>
     9 #include <sys/types.h>
    10 #define __need_size_t
    11 #include <stddef.h>
    13 extern char **environ;
    15 void	_EXFUN(_exit, (int __status ) _ATTRIBUTE ((noreturn)));
    17 int	_EXFUN(access,(const char *__path, int __amode ));
    18 unsigned  _EXFUN(alarm, (unsigned __secs ));
    19 int     _EXFUN(chdir, (const char *__path ));
    20 int     _EXFUN(chmod, (const char *__path, mode_t __mode ));
    21 int     _EXFUN(chown, (const char *__path, uid_t __owner, gid_t __group ));
    22 int     _EXFUN(close, (int __fildes ));
    23 char    _EXFUN(*ctermid, (char *__s ));
    24 char    _EXFUN(*cuserid, (char *__s ));
    25 int     _EXFUN(dup, (int __fildes ));
    26 int     _EXFUN(dup2, (int __fildes, int __fildes2 ));
    27 int     _EXFUN(execl, (const char *__path, const char *, ... ));
    28 int     _EXFUN(execle, (const char *__path, const char *, ... ));
    29 int     _EXFUN(execlp, (const char *__file, const char *, ... ));
    30 int     _EXFUN(execv, (const char *__path, char * const __argv[] ));
    31 int     _EXFUN(execve, (const char *__path, char * const __argv[], char * const __envp[] ));
    32 int     _EXFUN(execvp, (const char *__file, char * const __argv[] ));
    33 pid_t   _EXFUN(fork, (void ));
    34 long    _EXFUN(fpathconf, (int __fd, int __name ));
    35 int     _EXFUN(fsync, (int __fd));
    36 char    _EXFUN(*getcwd, (char *__buf, size_t __size ));
    37 gid_t   _EXFUN(getegid, (void ));
    38 uid_t   _EXFUN(geteuid, (void ));
    39 gid_t   _EXFUN(getgid, (void ));
    40 int     _EXFUN(getgroups, (int __gidsetsize, gid_t __grouplist[] ));
    41 char    _EXFUN(*getlogin, (void ));
    42 char 	_EXFUN(*getpass, (__const char *__prompt));
    43 size_t  _EXFUN(getpagesize, (void));
    44 pid_t   _EXFUN(getpgrp, (void ));
    45 pid_t   _EXFUN(getpid, (void ));
    46 pid_t   _EXFUN(getppid, (void ));
    47 uid_t   _EXFUN(getuid, (void ));
    48 int     _EXFUN(isatty, (int __fildes ));
    49 int     _EXFUN(link, (const char *__path1, const char *__path2 ));
    50 int	_EXFUN(nice, (int __nice_value ));
    51 off_t   _EXFUN(lseek, (int __fildes, off_t __offset, int __whence ));
    52 long    _EXFUN(pathconf, (const char *__path, int __name ));
    53 int     _EXFUN(pause, (void ));
    54 int     _EXFUN(pipe, (int __fildes[2] ));
    55 int     _EXFUN(read, (int __fildes, void *__buf, size_t __nbyte ));
    56 int     _EXFUN(rmdir, (const char *__path ));
    57 void *  _EXFUN(sbrk,  (size_t __incr));
    58 int     _EXFUN(setgid, (gid_t __gid ));
    59 int     _EXFUN(setpgid, (pid_t __pid, pid_t __pgid ));
    60 pid_t   _EXFUN(setsid, (void ));
    61 int     _EXFUN(setuid, (uid_t __uid ));
    62 unsigned _EXFUN(sleep, (unsigned int __seconds ));
    63 void    _EXFUN(swab, (const void *, void *, ssize_t));
    64 long    _EXFUN(sysconf, (int __name ));
    65 pid_t   _EXFUN(tcgetpgrp, (int __fildes ));
    66 int     _EXFUN(tcsetpgrp, (int __fildes, pid_t __pgrp_id ));
    67 char    _EXFUN(*ttyname, (int __fildes ));
    68 int     _EXFUN(unlink, (const char *__path ));
    69 int     _EXFUN(write, (int __fildes, const void *__buf, size_t __nbyte ));
    71 /* Provide prototypes for most of the _<systemcall> names that are
    72    provided in newlib for some compilers.  */
    73 int     _EXFUN(_close, (int __fildes ));
    74 pid_t   _EXFUN(_fork, (void ));
    75 pid_t   _EXFUN(_getpid, (void ));
    76 int     _EXFUN(_link, (const char *__path1, const char *__path2 ));
    77 off_t   _EXFUN(_lseek, (int __fildes, off_t __offset, int __whence ));
    78 int     _EXFUN(_read, (int __fildes, void *__buf, size_t __nbyte ));
    79 void *  _EXFUN(_sbrk,  (size_t __incr));
    80 int     _EXFUN(_unlink, (const char *__path ));
    81 int     _EXFUN(_write, (int __fildes, const void *__buf, size_t __nbyte ));
    83 #if defined(__CYGWIN32__) || defined(__rtems__)
    84 unsigned _EXFUN(usleep, (unsigned int __useconds));
    85 int     _EXFUN(ftruncate, (int __fd, off_t __length));
    86 int     _EXFUN(truncate, (const char *, off_t __length));
    87 int	_EXFUN(gethostname, (char *__name, size_t __len));
    88 char *	_EXFUN(mktemp, (char *));
    89 int     _EXFUN(sync, (void));
    90 int     _EXFUN(readlink, (const char *__path, char *__buf, int __buflen));
    91 int     _EXFUN(symlink, (const char *__name1, const char *__name2));
    92 #endif
    94 # define	F_OK	0
    95 # define	R_OK	4
    96 # define	W_OK	2
    97 # define	X_OK	1
    99 # define	SEEK_SET	0
   100 # define	SEEK_CUR	1
   101 # define	SEEK_END	2
   103 /*
   104  *  RTEMS adheres to a later version of POSIX -- 1003.1b.
   105  *
   106  *  XXX this version string should change.
   107  */
   109 #ifdef __rtems__
   110 #ifndef _POSIX_JOB_CONTROL
   111 # define _POSIX_JOB_CONTROL     1
   112 #endif
   113 #ifndef _POSIX_SAVED_IDS
   114 # define _POSIX_SAVED_IDS       1
   115 #endif
   116 # define _POSIX_VERSION 199009L
   117 #else
   118 #ifdef __svr4__
   119 # define _POSIX_JOB_CONTROL     1
   120 # define _POSIX_SAVED_IDS       1
   121 # define _POSIX_VERSION 199009L
   122 #endif
   123 #endif
   125 #ifdef __CYGWIN32__
   126 # define _POSIX_JOB_CONTROL	1
   127 # define _POSIX_SAVED_IDS	0
   128 # define _POSIX_VERSION		199009L
   129 #endif
   131 #define STDIN_FILENO    0       /* standard input file descriptor */
   132 #define STDOUT_FILENO   1       /* standard output file descriptor */
   133 #define STDERR_FILENO   2       /* standard error file descriptor */
   135 long _EXFUN(sysconf, (int __name));
   137 # define	_SC_ARG_MAX	0
   138 # define	_SC_CHILD_MAX	1
   139 # define	_SC_CLK_TCK	2
   140 # define	_SC_NGROUPS_MAX	3
   141 # define	_SC_OPEN_MAX	4
   142 /* no _SC_STREAM_MAX */
   143 # define	_SC_JOB_CONTROL	5
   144 # define	_SC_SAVED_IDS	6
   145 # define	_SC_VERSION	7
   146 # define        _SC_PAGESIZE    8
   148 # define	_PC_LINK_MAX	0
   149 # define	_PC_MAX_CANON	1
   150 # define	_PC_MAX_INPUT	2
   151 # define	_PC_NAME_MAX	3
   152 # define	_PC_PATH_MAX	4
   153 # define	_PC_PIPE_BUF	5
   154 # define	_PC_CHOWN_RESTRICTED	6
   155 # define	_PC_NO_TRUNC	7
   156 # define	_PC_VDISABLE	8
   157 # define	_PC_ASYNC_IO    9
   158 # define	_PC_PRIO_IO     10
   159 # define	_PC_SYNC_IO     11
   161 # ifndef	_POSIX_SOURCE
   162 #  define	MAXNAMLEN	1024
   163 # endif		/* _POSIX_SOURCE */
   165 /* FIXME: This is temporary until winsup gets sorted out.  */
   166 #ifdef __CYGWIN32__
   167 #define MAXPATHLEN (260 - 1 /* NUL */)
   168 #else
   169 # define	MAXPATHLEN	1024
   170 #endif
   172 #ifdef __cplusplus
   173 }
   174 #endif
   175 #endif /* _SYS_UNISTD_H */
.