\r
\r
__BEGIN_DECLS\r
+int dup(int);\r
int rename(const char *, const char *);\r
\r
+/* Functions implemented for compatibility. */\r
+int getopt(int, char * const [], const char *);\r
+extern char *optarg; /* getopt(3) external variables */\r
+extern int optind;\r
+pid_t getpgrp(void);\r
+pid_t tcgetpgrp(int);\r
+char *getpass(const char *);\r
+\r
// Networking\r
long gethostid(void);\r
int gethostname(char *, size_t);\r
int sethostid(long);\r
int sethostname(const char *, size_t);\r
\r
+/* Stub functions implemented for porting ease.\r
+ These functions always fail or return NULL.\r
+*/\r
+__aconst char *getlogin(void);\r
+pid_t fork(void);\r
+uid_t getuid(void);\r
+\r
// For Future implementation\r
-__dead void _exit(int) __attribute__((__noreturn__));\r
ssize_t pread(int, void *, size_t, off_t);\r
ssize_t pwrite(int, const void *, size_t, off_t);\r
int syscall(int, ...);\r
-int dup(int);\r
-pid_t fork(void);\r
\r
-// The following *nix functions are not implemented\r
+#if 0 // The following functions are not implemented\r
+__dead void _exit(int) __attribute__((__noreturn__));\r
unsigned int alarm(unsigned int);\r
int chown(const char *, uid_t, gid_t);\r
size_t confstr(int, char *, size_t);\r
uid_t geteuid(void);\r
gid_t getgid(void);\r
int getgroups(int, gid_t []);\r
-__aconst char *getlogin(void);\r
-pid_t getpgrp(void);\r
pid_t getpid(void);\r
pid_t getppid(void);\r
-uid_t getuid(void);\r
int link(const char *, const char *);\r
long pathconf(const char *, int);\r
int pause(void);\r
int setuid(uid_t);\r
unsigned int sleep(unsigned int);\r
long sysconf(int);\r
-pid_t tcgetpgrp(int);\r
+\r
int tcsetpgrp(int, pid_t);\r
__aconst char *ttyname(int);\r
\r
-int getopt(int, char * const [], const char *);\r
-\r
-extern char *optarg; /* getopt(3) external variables */\r
extern int opterr;\r
-extern int optind;\r
extern int optopt;\r
-extern int optreset; /* getopt(3) external variable */\r
-extern char *suboptarg; /* getsubopt(3) external variable */\r
+extern int optreset;\r
+extern char *suboptarg;\r
\r
int setegid(gid_t);\r
int seteuid(uid_t);\r
int nice(int);\r
__aconst char *crypt(const char *, const char *);\r
int encrypt(char *, int);\r
-char *getpass(const char *);\r
pid_t getsid(pid_t);\r
\r
#ifndef intptr_t\r
int rcmd_af(char **, int, const char *, const char *, const char *, int *, int);\r
int rresvport_af(int *, int);\r
int iruserok_sa(const void *, int, int, const char *, const char *);\r
+#endif /* Unimplemented functions. */\r
\r
__END_DECLS\r
\r