]>
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 *);
43 int gethostname(char *, size_t);
44 int getdomainname(char *, size_t);
45 int setdomainname(const char *, size_t);
47 int sethostname(const char *, size_t);
49 /* Stub functions implemented for porting ease.
50 These functions always fail or return NULL.
52 __aconst
char *getlogin(void);
56 // For Future implementation
57 ssize_t
pread(int, void *, size_t, off_t
);
58 ssize_t
pwrite(int, const void *, size_t, off_t
);
59 int syscall(int, ...);
61 #if 0 // The following functions are not implemented
62 __dead
void _exit(int) __attribute__((__noreturn__
));
63 unsigned int alarm(unsigned int);
64 int chown(const char *, uid_t
, gid_t
);
65 size_t confstr(int, char *, size_t);
66 int execl(const char *, const char *, ...);
67 int execle(const char *, const char *, ...);
68 int execlp(const char *, const char *, ...);
69 int execv(const char *, char * const *);
70 int execve(const char *, char * const *, char * const *);
71 int execvp(const char *, char * const *);
72 long fpathconf(int, int);
76 int getgroups(int, gid_t
[]);
79 int link(const char *, const char *);
80 long pathconf(const char *, int);
84 int setpgid(pid_t
, pid_t
);
87 unsigned int sleep(unsigned int);
90 int tcsetpgrp(int, pid_t
);
91 __aconst
char *ttyname(int);
96 extern char *suboptarg
;
102 int ttyname_r(int, char *, size_t);
103 int chroot(const char *);
105 __aconst
char *crypt(const char *, const char *);
106 int encrypt(char *, int);
110 typedef __intptr_t
intptr_t;
111 #define intptr_t __intptr_t
116 int fchown(int, uid_t
, gid_t
);
117 int getdtablesize(void);
118 __pure
int getpagesize(void); /* legacy */
119 pid_t
getpgid(pid_t
);
120 int lchown(const char *, uid_t
, gid_t
);
121 int lockf(int, int, off_t
);
122 ssize_t
readlink(const char * __restrict
, char * __restrict
, size_t);
123 void *sbrk(intptr_t);
124 int setregid(gid_t
, gid_t
);
125 int setreuid(uid_t
, uid_t
);
126 void swab(const void *, void *, size_t);
127 int symlink(const char *, const char *);
129 useconds_t
ualarm(useconds_t
, useconds_t
);
130 int usleep(useconds_t
);
131 pid_t
vfork(void) __RENAME(__vfork14
);
134 * Implementation-defined extensions
136 int acct(const char *);
138 int des_cipher(const char *, char *, long, int);
139 int des_setkey(const char *);
140 void endusershell(void);
141 int exect(const char *, char * const *, char * const *);
143 int fsync_range(int, int, off_t
, off_t
);
144 int getgrouplist(const char *, gid_t
, gid_t
*, int *);
145 int getgroupmembership(const char *, gid_t
, gid_t
*, int, int *);
146 mode_t
getmode(const void *, mode_t
);
147 int getsubopt(char **, char * const *, char **);
148 __aconst
char *getusershell(void);
149 int initgroups(const char *, gid_t
);
150 int iruserok(uint32_t, int, const char *, const char *);
152 int nfssvc(int, void *);
153 int profil(char *, size_t, u_long
, u_int
);
154 void psignal(unsigned int, const char *);
155 int rcmd(char **, int, const char *, const char *, const char *, int *);
156 int revoke(const char *);
157 int rresvport(int *);
158 int ruserok(const char *, int, const char *, const char *);
159 int setgroups(int, const gid_t
*);
160 int setlogin(const char *);
161 void *setmode(const char *);
164 void setusershell(void);
165 void strmode(mode_t
, char *);
166 __aconst
char *strsignal(int);
167 int swapctl(int, void *, int);
168 quad_t
__syscall(quad_t
, ...);
169 int undelete(const char *);
170 int rcmd_af(char **, int, const char *, const char *, const char *, int *, int);
171 int rresvport_af(int *, int);
172 int iruserok_sa(const void *, int, int, const char *, const char *);
173 #endif /* Unimplemented functions. */
177 #endif /* !_UNISTD_H_ */