]>
git.proxmox.com Git - mirror_edk2.git/blob - StdLib/Include/unistd.h
3 Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials are licensed and made available under
5 the terms and conditions of the BSD License that accompanies this distribution.
6 The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 //#include <machine/ansi.h>
17 //#include <machine/int_types.h>
18 //#include <sys/featuretest.h>
19 //#include <sys/types.h>
20 #include <sys/unistd.h>
21 #include <sys/EfiSysCall.h>
31 int rename(const char *, const char *);
33 /* Functions implemented for compatibility. */
34 int getopt(int, char * const [], const char *);
35 extern char *optarg
; /* getopt(3) external variables */
39 char *getpass(const char *);
40 int usleep(useconds_t
);
41 unsigned int sleep(unsigned int);
42 char *basename(char *path
);
46 int gethostname(char *, size_t);
47 int getdomainname(char *, size_t);
48 int setdomainname(const char *, size_t);
50 int sethostname(const char *, size_t);
52 /* Stub functions implemented for porting ease.
53 These functions always fail or return NULL.
55 __aconst
char *getlogin(void);
59 // For Future implementation
60 ssize_t
pread(int, void *, size_t, off_t
);
61 ssize_t
pwrite(int, const void *, size_t, off_t
);
62 int syscall(int, ...);
64 #if 0 // The following functions are not implemented
65 __dead
void _exit(int) __attribute__((__noreturn__
));
66 unsigned int alarm(unsigned int);
67 int chown(const char *, uid_t
, gid_t
);
68 size_t confstr(int, char *, size_t);
69 int execl(const char *, const char *, ...);
70 int execle(const char *, const char *, ...);
71 int execlp(const char *, const char *, ...);
72 int execv(const char *, char * const *);
73 int execve(const char *, char * const *, char * const *);
74 int execvp(const char *, char * const *);
75 long fpathconf(int, int);
79 int getgroups(int, gid_t
[]);
82 int link(const char *, const char *);
83 long pathconf(const char *, int);
87 int setpgid(pid_t
, pid_t
);
92 int tcsetpgrp(int, pid_t
);
93 __aconst
char *ttyname(int);
98 extern char *suboptarg
;
104 int ttyname_r(int, char *, size_t);
105 int chroot(const char *);
107 __aconst
char *crypt(const char *, const char *);
108 int encrypt(char *, int);
112 typedef __intptr_t
intptr_t;
113 #define intptr_t __intptr_t
118 int fchown(int, uid_t
, gid_t
);
119 int getdtablesize(void);
120 __pure
int getpagesize(void); /* legacy */
121 pid_t
getpgid(pid_t
);
122 int lchown(const char *, uid_t
, gid_t
);
123 int lockf(int, int, off_t
);
124 ssize_t
readlink(const char * __restrict
, char * __restrict
, size_t);
125 void *sbrk(intptr_t);
126 int setregid(gid_t
, gid_t
);
127 int setreuid(uid_t
, uid_t
);
128 void swab(const void *, void *, size_t);
129 int symlink(const char *, const char *);
131 useconds_t
ualarm(useconds_t
, useconds_t
);
132 pid_t
vfork(void) __RENAME(__vfork14
);
135 * Implementation-defined extensions
137 int acct(const char *);
139 int des_cipher(const char *, char *, long, int);
140 int des_setkey(const char *);
141 void endusershell(void);
142 int exect(const char *, char * const *, char * const *);
144 int fsync_range(int, int, off_t
, off_t
);
145 int getgrouplist(const char *, gid_t
, gid_t
*, int *);
146 int getgroupmembership(const char *, gid_t
, gid_t
*, int, int *);
147 mode_t
getmode(const void *, mode_t
);
148 int getsubopt(char **, char * const *, char **);
149 __aconst
char *getusershell(void);
150 int initgroups(const char *, gid_t
);
151 int iruserok(uint32_t, int, const char *, const char *);
153 int nfssvc(int, void *);
154 int profil(char *, size_t, u_long
, u_int
);
155 void psignal(unsigned int, const char *);
156 int rcmd(char **, int, const char *, const char *, const char *, int *);
157 int revoke(const char *);
158 int rresvport(int *);
159 int ruserok(const char *, int, const char *, const char *);
160 int setgroups(int, const gid_t
*);
161 int setlogin(const char *);
162 void *setmode(const char *);
165 void setusershell(void);
166 void strmode(mode_t
, char *);
167 __aconst
char *strsignal(int);
168 int swapctl(int, void *, int);
169 quad_t
__syscall(quad_t
, ...);
170 int undelete(const char *);
171 int rcmd_af(char **, int, const char *, const char *, const char *, int *, int);
172 int rresvport_af(int *, int);
173 int iruserok_sa(const void *, int, int, const char *, const char *);
174 #endif /* Unimplemented functions. */
178 #endif /* !_UNISTD_H_ */