diff options
author | Eric Andersen <andersen@codepoet.org> | 2000-07-06 00:20:50 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2000-07-06 00:20:50 +0000 |
commit | a67c6273255c0357bf1e14ea35005b47c9a94e6c (patch) | |
tree | 34bce2531223bbc738b0c4e13fa25aeca2d1d79e /include | |
parent | 42ee079162ef0aacb93181dcc0df86c9d33f75c5 (diff) |
Lots and lots of cleanups.
-Erik
Diffstat (limited to 'include')
-rw-r--r-- | include/resolv.h | 8 | ||||
-rw-r--r-- | include/stdio.h | 5 | ||||
-rw-r--r-- | include/stdlib.h | 3 | ||||
-rw-r--r-- | include/unistd.h | 53 |
4 files changed, 31 insertions, 38 deletions
diff --git a/include/resolv.h b/include/resolv.h index 53ee2f235..950795a28 100644 --- a/include/resolv.h +++ b/include/resolv.h @@ -55,13 +55,13 @@ int encode_answer(struct resolv_answer * a, unsigned char * dest, int maxlen); int decode_answer(unsigned char * message, int offset, struct resolv_answer * a); -char * resolve_name(const char * name, int mailbox); +const char * resolve_name(const char * name, int mailbox); int encode_packet(struct resolv_header * h, struct resolv_question ** q, - struct resolv_question ** an, - struct resolv_question ** ns, - struct resolv_question ** ar, + struct resolv_answer ** an, + struct resolv_answer ** ns, + struct resolv_answer ** ar, unsigned char * dest, int maxlen); int decode_packet(unsigned char * data, struct resolv_header * h); diff --git a/include/stdio.h b/include/stdio.h index e65f49c0b..e807262f0 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -3,6 +3,7 @@ #define __STDIO_H #include <features.h> +#include <stdarg.h> #include <sys/types.h> #ifndef SEEK_SET @@ -197,5 +198,9 @@ extern int vfscanf __P ((FILE *__restrict __s, __attribute__ ((__format__ (__scanf__, 2, 0))); +/* Print a message describing the meaning of the value of errno. */ +extern void perror __P ((__const char *__s)); + + #endif /* __STDIO_H */ diff --git a/include/stdlib.h b/include/stdlib.h index 047300af2..f3c00ab31 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -68,6 +68,9 @@ extern char * gcvt __P ((float number, size_t ndigit, char * buf)); #define atof(x) strtod((x),(char**)0) #define atoi(x) (int)strtol((x),(char**)0,10) #define atol(x) strtol((x),(char**)0,10) +#ifdef __LIBC__ +char* itoa(int i); +#endif /* Returned by `div'. */ typedef struct diff --git a/include/unistd.h b/include/unistd.h index fa1caf27b..57a203dfd 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -36,6 +36,10 @@ extern int symlink __P ((__const char *__from, __const char *__to)); extern int readlink __P ((__const char *__path, char *__buf, size_t __len)); extern int unlink __P ((__const char *__name)); extern char *getcwd __P ((char *__buf, size_t __size)); +/* Duplicate FD, returning a new file descriptor on the same file. */ +extern int dup __P ((int __fd)); +/* Duplicate FD to FD2, closing FD2 and making it open on the same file. */ +extern int dup2 __P ((int __fd, int __fd2)); extern int fchdir __P ((int __fd)); extern int chdir __P ((__const char *__path)); extern int chown __P ((__const char *__file, @@ -90,44 +94,25 @@ extern int execve __P ((__const char *__path, char *__const __argv[], extern int execvp __P ((__const char *__file, char *__const __argv[])); +/* Execute PATH with arguments ARGV and environment ENVP. */ +extern int execvep __P ((__const char *path, char *__const __argv[], + char *__const __envp[])); +/* Terminate program execution with the low-order 8 bits of STATUS. */ +extern void _exit __P ((int __status)) __attribute__ ((__noreturn__)); +/* Clone the calling process, creating an exact copy. + * Return -1 for errors, 0 to the new process, + * and the process ID of the new process to the old process. */ +extern __pid_t __fork __P ((void)); +extern __pid_t fork __P ((void)); -#if 0 -#ifndef SYS_fork -#define SYS_fork 2 -#endif - -#define vfork() ({ \ -register long __res __asm__ ("%d0"); \ -__asm__ __volatile__ ("trap #0" \ - : "=g" (__res) \ - : "0" (SYS_fork) \ - : "%d0"); \ -__res; \ -}) -#endif - -#ifdef __mc68000__ - -#define vfork() ({ \ -register unsigned long __res __asm__ ("%d0") = __NR_fork; \ -__asm__ __volatile__ ("trap #0" \ - : "=g" (__res) \ - : "0" (__res) \ - : "%d0"); \ -if (__res >= (unsigned long)-4096) { \ - errno = -__res; \ - __res = (pid_t)-1; \ -} \ -(pid_t)__res; \ -}) - - +/* Clone the calling process, but without copying the whole address space. + * The calling process is suspended until the new process exits or is + * replaced by a call to `execve'. Return -1 for errors, 0 to the new process, + * and the process ID of the new process to the old process. */ +extern __pid_t vfork __P ((void)); -#define fork fork_not_available_use_vfork -#define clone clone_not_available_use__clone -#endif #ifndef SEEK_SET #define SEEK_SET 0 |