diff options
author | Jakob Kaivo <jkk@ung.org> | 2024-01-31 17:07:29 -0500 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2024-01-31 17:07:29 -0500 |
commit | 40e2986d3d196855bba3836a60a482fd3a0f73a8 (patch) | |
tree | 6ce03ea7ddffb7f0001bff12706b21f9bce3c67e /src | |
parent | 421cc9cd7295e5b92cf167a41bd8f55a3b842728 (diff) |
remove posix and xopen specific functions
Diffstat (limited to 'src')
65 files changed, 0 insertions, 1055 deletions
diff --git a/src/ctype/_tolower.h b/src/ctype/_tolower.h deleted file mode 100644 index 7ea943df..00000000 --- a/src/ctype/_tolower.h +++ /dev/null @@ -1,24 +0,0 @@ -#if 0 - -#include <ctype.h> - -/** convert an uppercase letter to lowercase **/ - -#define _tolower(__c) tolower(__c) - -/*** -converts an uppercase letter to its equivalent lowercase letter in the current -locale. -***/ - -/* -ASSERT_REPRESENTABLE(c, 0, UCHAR_MAX, unsigned char, EOF) -RETURN_SUCCESS(ARGUMENT(c) converted to uppercase) -UNDEFINED(ARGUMENT(c) is not an upper-case letter) -LC_CTYPE -XOPEN(4) -XOBSOLETE(700, FUNCTION(tolower)) -*/ - - -#endif diff --git a/src/ctype/_toupper.h b/src/ctype/_toupper.h deleted file mode 100644 index 5abdb172..00000000 --- a/src/ctype/_toupper.h +++ /dev/null @@ -1,24 +0,0 @@ -#if 0 - -#include <ctype.h> - -/** convert a lowercase letter to uppercase **/ - -#define _toupper(__c) toupper(__c) - -/*** -converts a lowercase letter to its equivalent uppercase letter in the current -locale. -***/ - -/* -ASSERT_REPRESENTABLE(c, 0, UCHAR_MAX, unsigned char, EOF) -RETURN_SUCCESS(ARGUMENT(c) converted to uppercase) -UNDEFINED(ARGUMENT(c) is not a lowercase letter) -LC_CTYPE -XOPEN(4) -XOBSOLETE(700, FUNCTION(toupper)) -*/ - - -#endif diff --git a/src/ctype/isascii.c b/src/ctype/isascii.c deleted file mode 100644 index cf7bba28..00000000 --- a/src/ctype/isascii.c +++ /dev/null @@ -1,26 +0,0 @@ -#include <ctype.h> -#include "_ctype.h" - -/** test whether a character is in the ASCII range **/ - -int isascii(int c) -{ - SIGNAL_SAFE(0); - if (0 <= c && c <= 0177) { - return 1; - } - return 0; -} - -__check_1(int, 0, isascii, int) - -/*** -tests whether ARGUMENT(c) is a 7-bit US-ASCII character. -***/ - -/* -RETURN(NONZERO, ARGUMENT(c) is between 0 and octal 0177 inclusive) -RETURN(ZERO, ARGUMENT(c) is outside of the ASCII range) -XOBSOLETE(700) -XOPEN(4) -*/ diff --git a/src/ctype/toascii.c b/src/ctype/toascii.c deleted file mode 100644 index c352a121..00000000 --- a/src/ctype/toascii.c +++ /dev/null @@ -1,22 +0,0 @@ -#include <ctype.h> -#include "_ctype.h" - -/** convert a character to 7-bit ASCII **/ - -int toascii(int c) -{ - SIGNAL_SAFE(0); - return (c & 0x7f); -} - -__check_1(int, 0, toascii, int) - -/*** -converts ARGUMENT(c) to 7-bit ASCII. -***/ - -/* -RETURN(ARGUMENT(c) & 0x7f) -XOBSOLETE(700) -XOPEN(4) -*/ diff --git a/src/math/gamma.c b/src/math/gamma.c deleted file mode 100644 index 644b5fac..00000000 --- a/src/math/gamma.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <math.h> - -double gamma(double x) -{ - SIGNAL_SAFE(0); - return x; -} - -/* -XOPEN(4,600) -LINK(m) -*/ diff --git a/src/math/j0.c b/src/math/j0.c deleted file mode 100644 index 38140422..00000000 --- a/src/math/j0.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <math.h> - -double j0(double x) -{ - SIGNAL_SAFE(0); - return x; -} - -/* -XOPEN(4) -LINK(m) -*/ diff --git a/src/math/j1.c b/src/math/j1.c deleted file mode 100644 index 42214704..00000000 --- a/src/math/j1.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <math.h> - -double j1(double x) -{ - SIGNAL_SAFE(0); - return x; -} - -/* -XOPEN(4) -LINK(m) -*/ diff --git a/src/math/jn.c b/src/math/jn.c deleted file mode 100644 index b490054c..00000000 --- a/src/math/jn.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <math.h> - -double jn(int n, double x) -{ - SIGNAL_SAFE(0); - return x; -} - -/* -XOPEN(4) -LINK(m) -*/ diff --git a/src/math/remainder.c b/src/math/remainder.c deleted file mode 100644 index 667e9758..00000000 --- a/src/math/remainder.c +++ /dev/null @@ -1,14 +0,0 @@ -#include <math.h> -#define TGSOURCE "remainder.c" -#include "_tgmath.h" - -TYPE TGFN(remainder)(TYPE x, TYPE y) -{ - SIGNAL_SAFE(0); -} - -/* -XOPEN(400) -POSIX(200112) -LINK(m) -*/ diff --git a/src/math/scalb.c b/src/math/scalb.c deleted file mode 100644 index 55c59741..00000000 --- a/src/math/scalb.c +++ /dev/null @@ -1,11 +0,0 @@ -#include <math.h> - -double scalb(double x, double n) -{ - SIGNAL_SAFE(0); -} - -/* -XOPEN(400) -LINK(m) -*/ diff --git a/src/math/signgam.c b/src/math/signgam.c deleted file mode 100644 index e200204b..00000000 --- a/src/math/signgam.c +++ /dev/null @@ -1,7 +0,0 @@ -#include <math.h> -int signgam; -/* -SIGNAL_SAFE(0) -XOPEN(4) -LINK(m) -*/ diff --git a/src/math/y0.c b/src/math/y0.c deleted file mode 100644 index c70878ee..00000000 --- a/src/math/y0.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <math.h> - -double y0(double x) -{ - SIGNAL_SAFE(0); - return x; -} - -/* -XOPEN(4) -LINK(m) -*/ diff --git a/src/math/y1.c b/src/math/y1.c deleted file mode 100644 index 819b3011..00000000 --- a/src/math/y1.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <math.h> - -double y1(double x) -{ - SIGNAL_SAFE(0); - return x; -} - -/* -XOPEN(4) -LINK(m) -*/ diff --git a/src/math/yn.c b/src/math/yn.c deleted file mode 100644 index 3761b11c..00000000 --- a/src/math/yn.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <math.h> - -double yn(int n, double x) -{ - SIGNAL_SAFE(0); - return x; -} - -/* -XOPEN(4) -LINK(m) -*/ diff --git a/src/setjmp/_longjmp.c b/src/setjmp/_longjmp.c deleted file mode 100644 index c274889c..00000000 --- a/src/setjmp/_longjmp.c +++ /dev/null @@ -1,33 +0,0 @@ -#include <setjmp.h> -#include "_safety.h" - -/** restore calling environment **/ - -void _longjmp(jmp_buf env, int val) -{ - SIGNAL_SAFE(0); - return longjmp(env, val); -} - -/*** -restores the environment, without manipulation the signal mask, of a previous -call to FUNCTION(_setjmp) and continues execution at the location of the call -to FUNCTION(_setjmp). - -All objects previously accessible at the time of the call to FUNCTION(_setjmp) -have the same values. Non-TYPE(volatile) objects of automatic storage duration -that have changed since the call to FUNCTION(_setjmp) have intederminate values. - -When execution resumes at the point of the original call to FUNCTION(_setjmp), -the value specified by ARGUMENT(val) is returned. If 0 is specified, then the -return value is 1. -***/ - -/* -UNDEFINED(There was no previous call to FUNCTION(_setjmp)) -UNDEFINED(The function containing the previous call to FUNCTION(_setjmp) is no longer executing) -UNDEFINED(THIS() is called from a nested signal handler) - -XOPEN(400) -XOBSOLETE(700, FUNCTION(siglongjmp)) -*/ diff --git a/src/setjmp/_setjmp.c b/src/setjmp/_setjmp.c deleted file mode 100644 index 6ed81a7e..00000000 --- a/src/setjmp/_setjmp.c +++ /dev/null @@ -1,30 +0,0 @@ -#include <setjmp.h> -#include "_safety.h" - -/** save program state **/ - -int _setjmp(jmp_buf env) -{ - SIGNAL_SAFE(0); - return setjmp(env); -} - -/*** -saves the current state, without the signal mask, of the calling environment -in the TYPEDEF(jmp_buf) ARGUMENT(env). -***/ - -/* -CONSTRAINT: entire controlling expression of a selection or iteration statement -CONSTRAINT: one operand of a relational or equality operator which is the entire controlling expression of a selction or iteration statement -CONSTRAINT: the operand of a unary ! as the entire controlling expression of a selection or iteration statement -CONSTRAINT: an entire expression statement - -UNSPECIFIED(Whether THIS() is a macro or identifier with external linkage) - -UNDEFINED(A macro definition of THIS() is suppressed in order to access an actual function) -UNDEFINED(A program defines an external identifier named LITERAL(setjmp)) - -XOPEN(400) -XOBSOLETE(700, FUNCTION(siglongjmp)) -*/ diff --git a/src/setjmp/sigjmp_buf.c b/src/setjmp/sigjmp_buf.c deleted file mode 100644 index 54358117..00000000 --- a/src/setjmp/sigjmp_buf.c +++ /dev/null @@ -1,16 +0,0 @@ -#include <setjmp.h> - -/** program environment with signal mask **/ - -typedef jmp_buf sigjmp_buf; - -/*** -is used to hold all the information needed to restore a a calling -environment, including the signal mask. -***/ - -/* -SIGNAL_SAFE(0) -TYPEDEF(an array type) -POSIX(1) -*/ diff --git a/src/setjmp/siglongjmp.c b/src/setjmp/siglongjmp.c deleted file mode 100644 index 7dc550ce..00000000 --- a/src/setjmp/siglongjmp.c +++ /dev/null @@ -1,42 +0,0 @@ -#if 0 - -#include <setjmp.h> -#include <sys/types.h> -#include <signal.h> -#include "_safety.h" - -/** restore calling environment with signal mask **/ - -void siglongjmp(sigjmp_buf env, int val) -{ - SIGNAL_SAFE(0); - - /* restore signal mask */ - - return longjmp(env, val); -} - -/*** -restores the environment, including the saved signal mask (if any), of a -previous call to FUNCTION(sigsetjmp) and continues execution at the location of -the call to FUNCTION(sigsetjmp). - -All objects previously accessible at the time of the call to FUNCTION(sigsetjmp) -have the same values. Non-TYPE(volatile) objects of automatic storage duration -that have changed since the call to FUNCTION(sigsetjmp) have intederminate -values. - -When execution resumes at the point of the original call to FUNCTION(sigsetjmp), -the value specified by ARGUMENT(val) is returned. If 0 is specified, then the -return value is 1. -***/ - -/* -UNDEFINED(There was no previous call to FUNCTION(setjmp)) -UNDEFINED(The function containing the previous call to FUNCTION(setjmp) is no longer executing) -UNDEFINED(THIS() is called from a nested signal handler) - -POSIX(1) -*/ - -#endif diff --git a/src/setjmp/sigsetjmp.c b/src/setjmp/sigsetjmp.c deleted file mode 100644 index 7ca66b31..00000000 --- a/src/setjmp/sigsetjmp.c +++ /dev/null @@ -1,40 +0,0 @@ -#if 0 - -#include <setjmp.h> -#include <sys/types.h> -#include <signal.h> - -/** save program state with signal mask **/ - -int sigsetjmp(sigjmp_buf env, int savemask) -{ - SIGNAL_SAFE(0); - - if (savemask) { - /* save mask to env */ - } - return setjmp(env); -} - -/*** -saves the current state of the calling environment in the -TYPEDEF(sigjmp_buf) ARGUMENT(env). If ARGUMENT(savemask) is nonzero, the saved -environment includes the signal mask of the current thread. -***/ - -/* -CONSTRAINT: entire controlling expression of a selection or iteration statement -CONSTRAINT: one operand of a relational or equality operator which is the entire controlling expression of a selction or iteration statement -CONSTRAINT: the operand of a unary ! as the entire controlling expression of a selection or iteration statement -CONSTRAINT: an entire expression statement - -UNSPECIFIED(Whether THIS() is a macro or identifier with external linkage) - -UNDEFINED(A macro definition of THIS() is suppressed in order to access an actual function) -UNDEFINED(A program defines an external identifier named LITERAL(setjmp)) - -POSIX(1) -*/ - - -#endif diff --git a/src/stdio/fdopen.c b/src/stdio/fdopen.c deleted file mode 100644 index 875d5b9a..00000000 --- a/src/stdio/fdopen.c +++ /dev/null @@ -1,13 +0,0 @@ -#include <stdio.h> -#include "_stdio.h" - -FILE * fdopen(int fildes, const char * mode) -{ - SIGNAL_SAFE(0); - (void)fildes; (void)mode; - return NULL; -} - -/* -POSIX(1) -*/ diff --git a/src/stdio/fileno.c b/src/stdio/fileno.c deleted file mode 100644 index 5432ecb0..00000000 --- a/src/stdio/fileno.c +++ /dev/null @@ -1,13 +0,0 @@ -#include <stdio.h> -#include "_stdio.h" - -int fileno(FILE * stream) -{ - SIGNAL_SAFE(0); - ASSERT_NONNULL(stream); - return stream->fd; -} - -/* -POSIX(1) -*/ diff --git a/src/stdio/getw.c b/src/stdio/getw.c deleted file mode 100644 index ad1b0bad..00000000 --- a/src/stdio/getw.c +++ /dev/null @@ -1,14 +0,0 @@ -#include <stdio.h> -#include "_stdio.h" - -# define _XOPEN_LEGACY 500 - -int getw(FILE *stream) -{ - SIGNAL_SAFE(0); - return 0; -} - -/* -XOPEN(4,600) -*/ diff --git a/src/stdio/pclose.c b/src/stdio/pclose.c deleted file mode 100644 index b39cfa15..00000000 --- a/src/stdio/pclose.c +++ /dev/null @@ -1,24 +0,0 @@ -#include <stdio.h> -#include <sys/types.h> -#include <sys/wait.h> -#include "_stdio.h" - -int pclose(FILE * stream) -{ - int status; - pid_t child = stream->pipe_pid; - SIGNAL_SAFE(0); - - if (child == 0) { - /* undefined behavior */ - } - - fclose(stream); - - waitpid(child, &status, 0); - return status; -} - -/* -POSIX(2) -*/ diff --git a/src/stdio/popen.c b/src/stdio/popen.c deleted file mode 100644 index 67b70f4d..00000000 --- a/src/stdio/popen.c +++ /dev/null @@ -1,71 +0,0 @@ -#include <stdio.h> -#include <string.h> -#include <errno.h> - -#include <sys/types.h> -#include <unistd.h" - -#include "_stdio.h" - -#ifdef __STDC_VERSION__ -#include <wchar.h> -#endif - -FILE * popen(const char * command, const char * mode) -{ - SIGNAL_SAFE(0); - ASSERT_NONNULL(command); - ASSERT_NONNULL(mode); - - int direction = 0; - if (!strcmp(mode, "w")) { - direction = 1; - } else if (strcmp(mode, "r")) { - errno = EINVAL; - return NULL; - } - - int pd[2]; - if (pipe(pd) == -1) { - return NULL; - } - - pid_t child = fork(); - if (child == -1) { - close(pd[0]); - close(pd[1]); - return NULL; - } else if (child == 0) { - if (direction == 1) { - dup2(pd[0], STDIN_FILENO); - } else { - dup2(pd[1], STDOUT_FILENO); - } - close(pd[0]); - close(pd[1]); - execl("/bin/sh", "sh", "-c", command, (char *)0); - return NULL; - } - - FILE *p = NULL; - if (direction == 1) { - p = fdopen(pd[1], "w"); - } else { - p = fdopen(pd[0], "r"); - } - - if (p == NULL) { - return NULL; - } - - #if defined __STDC_VERSION__ - fwide(p, -1); - #endif - - p->pipe_pid = child; - return p; -} - -/* -POSIX(2) -*/ diff --git a/src/stdio/putw.c b/src/stdio/putw.c deleted file mode 100644 index fb18c445..00000000 --- a/src/stdio/putw.c +++ /dev/null @@ -1,14 +0,0 @@ -#include <stdio.h> -#include "_stdio.h" - -# define _XOPEN_LEGACY 500 - -int putw(int w, FILE *stream) -{ - SIGNAL_SAFE(0); - (void)w; (void)stream; -} - -/* -XOPEN(4,600) -*/ diff --git a/src/stdio/tempnam.c b/src/stdio/tempnam.c deleted file mode 100644 index e40ec537..00000000 --- a/src/stdio/tempnam.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <stdio.h> - -char * tempnam(const char * dir, const char * pfx) -{ - SIGNAL_SAFE(0); - (void)dir; (void)pfx; - return NULL; -} - -/* -XOPEN(4) -*/ diff --git a/src/stdlib/a64l.c b/src/stdlib/a64l.c deleted file mode 100644 index 287e76f8..00000000 --- a/src/stdlib/a64l.c +++ /dev/null @@ -1,23 +0,0 @@ -#include <stdlib.h> -#include "_stdlib.h" - -long a64l(const char *s) -{ - SIGNAL_SAFE(0); - long l = 0; - int i = 0; - int n = 0; - int base = 1; - while (i < 6) { - /*n = indexof ((char*)radix64, s[i]); */ - if (n == -1) - return l; - l += n * base; - base *= 64; - } - return l; -} - -/* -XOPEN(400) -*/ diff --git a/src/stdlib/drand48.c b/src/stdlib/drand48.c deleted file mode 100644 index 8f0e4a55..00000000 --- a/src/stdlib/drand48.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <stdlib.h> -#include "_stdlib.h" - -double drand48(void) -{ - SIGNAL_SAFE(0); - return 0.0; -} - -/* -XOPEN(4) -*/ diff --git a/src/stdlib/ecvt.c b/src/stdlib/ecvt.c deleted file mode 100644 index fc2e6016..00000000 --- a/src/stdlib/ecvt.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <stdlib.h> -#include "_stdlib.h" - -char *ecvt(double value, int ndigit, int *decpt, int *sign) -{ - SIGNAL_SAFE(0); - return 0; -} - -/* -XOPEN(400,700) -*/ diff --git a/src/stdlib/erand48.c b/src/stdlib/erand48.c deleted file mode 100644 index e7fdeb4d..00000000 --- a/src/stdlib/erand48.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <stdlib.h> -#include "_stdlib.h" - -double erand48(unsigned short xsubi[3]) -{ - SIGNAL_SAFE(0); - return 0.0; -} - -/* -XOPEN(4) -*/ diff --git a/src/stdlib/fcvt.c b/src/stdlib/fcvt.c deleted file mode 100644 index 857a25d7..00000000 --- a/src/stdlib/fcvt.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <stdlib.h> -#include "_stdlib.h" - -char *fcvt(double value, int ndigit, int *decpt, int *sign) -{ - SIGNAL_SAFE(0); - return 0; -} - -/* -XOPEN(400,700) -*/ diff --git a/src/stdlib/gcvt.c b/src/stdlib/gcvt.c deleted file mode 100644 index 61b40132..00000000 --- a/src/stdlib/gcvt.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <stdlib.h> -#include "_stdlib.h" - -char *gcvt(double value, int ndigit, char *buf) -{ - SIGNAL_SAFE(0); - return 0; -} - -/* -XOPEN(400,700) -*/ diff --git a/src/stdlib/getsubopt.c b/src/stdlib/getsubopt.c deleted file mode 100644 index 93dd08c3..00000000 --- a/src/stdlib/getsubopt.c +++ /dev/null @@ -1,13 +0,0 @@ -#include <stdlib.h> -#include "_stdlib.h" - -int getsubopt(char ** optionp, char * const * keylistp, char ** valuep) -{ - SIGNAL_SAFE(0); - return 0; -} - -/* -XOPEN(400) -POSIX(200809) -*/ diff --git a/src/stdlib/grantpt.c b/src/stdlib/grantpt.c deleted file mode 100644 index 49796817..00000000 --- a/src/stdlib/grantpt.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <stdlib.h> -#include "_stdlib.h" - -int grantpt(int fildes) -{ - SIGNAL_SAFE(0); - return fildes; -} - -/* -XOPEN(400) -*/ diff --git a/src/stdlib/initstate.c b/src/stdlib/initstate.c deleted file mode 100644 index fde257eb..00000000 --- a/src/stdlib/initstate.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <stdlib.h> -#include "_stdlib.h" - -char * initstate(unsigned seed, char * state, size_t size) -{ - SIGNAL_SAFE(0); - return state; -} - -/* -XOPEN(400) -*/ diff --git a/src/stdlib/jrand48.c b/src/stdlib/jrand48.c deleted file mode 100644 index 470dbce5..00000000 --- a/src/stdlib/jrand48.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <stdlib.h> -#include "_stdlib.h" - -long jrand48(unsigned short xsub[3]) -{ - SIGNAL_SAFE(0); - return 0; -} - -/* -XOPEN(4) -*/ diff --git a/src/stdlib/l64a.c b/src/stdlib/l64a.c deleted file mode 100644 index 67c0f9b9..00000000 --- a/src/stdlib/l64a.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <stdlib.h> -#include "_stdlib.h" - -char * l64a(long value) -{ - SIGNAL_SAFE(0); - return NULL; -} - -/* -XOPEN(400) -*/ diff --git a/src/stdlib/lcong48.c b/src/stdlib/lcong48.c deleted file mode 100644 index ac43c301..00000000 --- a/src/stdlib/lcong48.c +++ /dev/null @@ -1,11 +0,0 @@ -#include <stdlib.h> -#include "_stdlib.h" - -void lcong48(unsigned short param[7]) -{ - SIGNAL_SAFE(0); -} - -/* -XOPEN(4) -*/ diff --git a/src/stdlib/lrand48.c b/src/stdlib/lrand48.c deleted file mode 100644 index f4bb3c70..00000000 --- a/src/stdlib/lrand48.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <stdlib.h> -#include "_stdlib.h" - -long lrand48(void) -{ - SIGNAL_SAFE(0); - return 0; -} - -/* -XOPEN(4) -*/ diff --git a/src/stdlib/mkstemp.c b/src/stdlib/mkstemp.c deleted file mode 100644 index 7e721167..00000000 --- a/src/stdlib/mkstemp.c +++ /dev/null @@ -1,13 +0,0 @@ -#include <stdlib.h> -#include "_stdlib.h" - -int mkstemp(char * template) -{ - SIGNAL_SAFE(0); - return 0; -} - -/* -XOPEN(400) -POSIX(200809) -*/ diff --git a/src/stdlib/mktemp.c b/src/stdlib/mktemp.c deleted file mode 100644 index e1887653..00000000 --- a/src/stdlib/mktemp.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <stdlib.h> -#include "_stdlib.h" - -char *mktemp(char *template) -{ - SIGNAL_SAFE(0); - return template; -} - -/* -XOPEN(400,700) -*/ diff --git a/src/stdlib/mrand48.c b/src/stdlib/mrand48.c deleted file mode 100644 index 3a1c78b7..00000000 --- a/src/stdlib/mrand48.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <stdlib.h> -#include "_stdlib.h" - -long mrand48(void) -{ - SIGNAL_SAFE(0); - return 0; -} - -/* -XOPEN(4) -*/ diff --git a/src/stdlib/nrand48.c b/src/stdlib/nrand48.c deleted file mode 100644 index 73ca509b..00000000 --- a/src/stdlib/nrand48.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <stdlib.h> -#include "_stdlib.h" - -long nrand48(unsigned short xsubi[3]) -{ - SIGNAL_SAFE(0); - return 0; -} - -/* -XOPEN(4) -*/ diff --git a/src/stdlib/ptsname.c b/src/stdlib/ptsname.c deleted file mode 100644 index 147aa934..00000000 --- a/src/stdlib/ptsname.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <stdlib.h> -#include "_stdlib.h" - -char * ptsname(int fildes) -{ - SIGNAL_SAFE(0); - return NULL; -} - -/* -XOPEN(400) -*/ diff --git a/src/stdlib/putenv.c b/src/stdlib/putenv.c deleted file mode 100644 index 0cfc1cb8..00000000 --- a/src/stdlib/putenv.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <stdlib.h> -#include "_stdlib.h" - -int putenv(char * string) -{ - SIGNAL_SAFE(0); - return 0; -} - -/* -XOPEN(4) -*/ diff --git a/src/stdlib/random.c b/src/stdlib/random.c deleted file mode 100644 index 45f712a1..00000000 --- a/src/stdlib/random.c +++ /dev/null @@ -1,13 +0,0 @@ -#include <stdlib.h> -#include "_stdlib.h" - -long random(void) -{ - SIGNAL_SAFE(0); - - return 0; -} - -/* -XOPEN(400) -*/ diff --git a/src/stdlib/realpath.c b/src/stdlib/realpath.c deleted file mode 100644 index db8b7cab..00000000 --- a/src/stdlib/realpath.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <stdlib.h> -#include "_stdlib.h" - -char * realpath(const char * restrict file_name, char * restrict resolved_name) -{ - SIGNAL_SAFE(0); - return resolved_name; -} - -/* -XOPEN(400) -*/ diff --git a/src/stdlib/seed48.c b/src/stdlib/seed48.c deleted file mode 100644 index 42c194a4..00000000 --- a/src/stdlib/seed48.c +++ /dev/null @@ -1,13 +0,0 @@ -#include <stdlib.h> -#include "_stdlib.h" - -unsigned short * seed48(unsigned short seed16v[3]) -{ - SIGNAL_SAFE(0); - - return seed16v; -} - -/* -XOPEN(4) -*/ diff --git a/src/stdlib/setkey.c b/src/stdlib/setkey.c deleted file mode 100644 index 7659c223..00000000 --- a/src/stdlib/setkey.c +++ /dev/null @@ -1,11 +0,0 @@ -#include <stdlib.h> -#include "_stdlib.h" - -void setkey(const char * key) -{ - SIGNAL_SAFE(0); -} - -/* -XOPEN(4) -*/ diff --git a/src/stdlib/setstate.c b/src/stdlib/setstate.c deleted file mode 100644 index c58a0325..00000000 --- a/src/stdlib/setstate.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <stdlib.h> -#include "_stdlib.h" - -char * setstate(char * state) -{ - SIGNAL_SAFE(0); - return state; -} - -/* -XOPEN(400) -*/ diff --git a/src/stdlib/srand48.c b/src/stdlib/srand48.c deleted file mode 100644 index 5c0768e9..00000000 --- a/src/stdlib/srand48.c +++ /dev/null @@ -1,11 +0,0 @@ -#include <stdlib.h> -#include "_stdlib.h" - -void srand48(long seedval) -{ - SIGNAL_SAFE(0); -} - -/* -XOPEN(4) -*/ diff --git a/src/stdlib/srandom.c b/src/stdlib/srandom.c deleted file mode 100644 index 07b93e3c..00000000 --- a/src/stdlib/srandom.c +++ /dev/null @@ -1,11 +0,0 @@ -#include <stdlib.h> -#include "_stdlib.h" - -void srandom(unsigned seed) -{ - SIGNAL_SAFE(0); -} - -/* -XOPEN(400) -*/ diff --git a/src/stdlib/ttyslot.c b/src/stdlib/ttyslot.c deleted file mode 100644 index 1d440739..00000000 --- a/src/stdlib/ttyslot.c +++ /dev/null @@ -1,13 +0,0 @@ -#include <stdlib.h> -#include "_stdlib.h" - -int ttyslot(void) -{ - SIGNAL_SAFE(0); - - return 0; -} - -/* -XOPEN(400,600) -*/ diff --git a/src/stdlib/unlockpt.c b/src/stdlib/unlockpt.c deleted file mode 100644 index 69572138..00000000 --- a/src/stdlib/unlockpt.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <stdlib.h> - -int unlockpt(int fildes) -{ - SIGNAL_SAFE(0); - - return fildes; -} - -/* -XOPEN(400) -*/ diff --git a/src/stdlib/valloc.c b/src/stdlib/valloc.c deleted file mode 100644 index c93b2c43..00000000 --- a/src/stdlib/valloc.c +++ /dev/null @@ -1,11 +0,0 @@ -#include <stdlib.h> -#include "_stdlib.h" - -void *valloc(size_t size) -{ - SIGNAL_SAFE(0); -} - -/* -XOPEN(400,600) -*/ diff --git a/src/string/memccpy.c b/src/string/memccpy.c deleted file mode 100644 index c722ba7d..00000000 --- a/src/string/memccpy.c +++ /dev/null @@ -1,28 +0,0 @@ -#include <string.h> -#include "_safety.h" - -void *memccpy(void * restrict s1, const void * restrict s2, int c, size_t n) -{ - SIGNAL_SAFE(0); - - unsigned char *dst = s1; - const unsigned char *src = s2; - size_t i = 0; - - ASSERT_NOOVERLAP(s1, s2, n); - - for (i = 0; i < n; i++) { - dst[i] = src[i]; - if (dst[i] == (unsigned char)c) { - return dst + i + 1; - } - } - - return NULL; -} - -__check_4(void *, 0, memccpy, void * restrict, const void * restrict, int, size_t) - -/* -XOPEN(4) -*/ diff --git a/src/string/strdup.c b/src/string/strdup.c deleted file mode 100644 index ecd671db..00000000 --- a/src/string/strdup.c +++ /dev/null @@ -1,22 +0,0 @@ -#include <string.h> -#include <stdlib.h> -#include "_safety.h" - -char * strdup(const char *s) -{ - SIGNAL_SAFE(0); - - size_t len = strlen(s); - char *ret = malloc(len + 1); - if (ret) { - strcpy(ret, s); - } - return ret; -} - -__check_1(char *, 0, strdup, const char *) - -/* -XOPEN(400) -POSIX(200809) -*/ diff --git a/src/time/daylight.c b/src/time/daylight.c deleted file mode 100644 index f51a6ac6..00000000 --- a/src/time/daylight.c +++ /dev/null @@ -1,7 +0,0 @@ -#include <time.h> -int daylight; - -/* -XOPEN(4) -SIGNAL_SAFE(0); -*/ diff --git a/src/time/getdate.c b/src/time/getdate.c deleted file mode 100644 index 7840b2ef..00000000 --- a/src/time/getdate.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <time.h> -#include "_safety.h" - -struct tm *getdate(const char *string) -{ - SIGNAL_SAFE(0); - return NULL; -} - -/* -XOPEN(400) -*/ diff --git a/src/time/getdate_err.c b/src/time/getdate_err.c deleted file mode 100644 index 9dc056ce..00000000 --- a/src/time/getdate_err.c +++ /dev/null @@ -1,8 +0,0 @@ -#include <time.h> - -int getdate_err; - -/* -XOPEN(400) -SIGNAL_SAFE(0); -*/ diff --git a/src/time/strptime.c b/src/time/strptime.c deleted file mode 100644 index 5520684d..00000000 --- a/src/time/strptime.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <time.h> -#include "_safety.h" - -char *strptime(const char *restrict buf, const char *restrict format, struct tm *restrict tm) -{ - SIGNAL_SAFE(0); - return (char*)buf; -} - -/* -XOPEN(4) -*/ diff --git a/src/time/timezone.c b/src/time/timezone.c deleted file mode 100644 index a429f8d6..00000000 --- a/src/time/timezone.c +++ /dev/null @@ -1,7 +0,0 @@ -#include <time.h> -long timezone; - -/* -XOPEN(4) -SIGNAL_SAFE(0) -*/ diff --git a/src/wchar/wcswcs.c b/src/wchar/wcswcs.c deleted file mode 100644 index 07aff7d4..00000000 --- a/src/wchar/wcswcs.c +++ /dev/null @@ -1,26 +0,0 @@ -#if 0 - -#ifdef __STDC_VERSION__ -#include <wchar.h> -#else -#include <stddef.h> -#include "wctype/wint_t.c" -#include "wctype/wctrans_t.c" -#define wcsstr __wcsstr -#include "wcsstr.c" -#endif - -wchar_t * wcswcs(const wchar_t * s1, const wchar_t * s2) -{ - SIGNAL_SAFE(0); - /* TODO: overlap */ - - return wcsstr(s1, s2); -} - -/* -XOPEN(4,700) -*/ - - -#endif diff --git a/src/wchar/wcswidth.c b/src/wchar/wcswidth.c deleted file mode 100644 index 3aadc89b..00000000 --- a/src/wchar/wcswidth.c +++ /dev/null @@ -1,20 +0,0 @@ -#if 0 - -#include <stddef.h> -#include "wctype/wint_t.c" -#include "wctype/wctrans_t.c" -#include <wchar.h> - -int wcswidth(const wchar_t * wcsptr, size_t n) -{ - SIGNAL_SAFE(0); - -} - -/* -XOPEN(4) -NOTE: this portion is shaded WP in SUSv1 -*/ - - -#endif diff --git a/src/wchar/wcwidth.c b/src/wchar/wcwidth.c deleted file mode 100644 index 62ad08bb..00000000 --- a/src/wchar/wcwidth.c +++ /dev/null @@ -1,20 +0,0 @@ -#if 0 - -#include <stddef.h> -#include "wctype/wint_t.c" -#include "wctype/wctrans_t.c" -#include <wchar.h> - -int wcwidth(wchar_t wc) -{ - SIGNAL_SAFE(0); - -} - -/* -XOPEN(4) -NOTE: this function is shaded "WP" in SUSv1 -*/ - - -#endif |