Delete malloc.h and tgmath.h from libc.
authorGeorge Koehler <xkernigh@netscape.net>
Sat, 28 Oct 2017 17:57:10 +0000 (13:57 -0400)
committerGeorge Koehler <xkernigh@netscape.net>
Sat, 28 Oct 2017 18:24:35 +0000 (14:24 -0400)
This malloc.h might get confused with the private malloc.h in our
libc.  C programs should #include <stdlib.h> for malloc().

This tgmath.h has no useful content, and never worked because
complex.h is missing.

Touch build.lua (by deleting some whitespace) so the *.h globs see
the deletions.

lang/cem/libcc.ansi/headers/build.lua
lang/cem/libcc.ansi/headers/malloc.h [deleted file]
lang/cem/libcc.ansi/headers/tgmath.h [deleted file]

index 601d383..80feaf0 100644 (file)
@@ -23,4 +23,3 @@ installable {
        name = "pkg",
        map = installmap
 }
-       
diff --git a/lang/cem/libcc.ansi/headers/malloc.h b/lang/cem/libcc.ansi/headers/malloc.h
deleted file mode 100644 (file)
index 64a6de1..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * stdlib.h - standard library
- *
- * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
- * See the copyright notice in the ACK home directory, in the file "Copyright".
- */
-/* $Id$ */
-
-#ifndef _STDLIB_H
-#define        _STDLIB_H
-
-#include <stddef.h>
-
-#define        EXIT_FAILURE 1
-#define        EXIT_SUCCESS 0
-#define        RAND_MAX 32767
-#define        MB_CUR_MAX sizeof(wchar_t)
-
-typedef struct { int quot, rem; } div_t;
-typedef struct { long quot, rem; } ldiv_t;
-
-extern double atof(const char *_nptr);
-extern int atoi(const char *_nptr);
-extern long atol(const char *_nptr);
-extern double strtod(const char *_nptr, char **_endptr);
-extern long strtol(const char *_nptr, char **_endptr, int _base);
-extern unsigned long strtoul(const char *_nptr, char **_endptr, int _base);
-extern int rand(void);
-extern void srand(unsigned int _seed);
-extern void* calloc(size_t _nmemb, size_t _size);
-extern void free(void *_ptr);
-extern void* malloc(size_t _size);
-extern void* realloc(void *_ptr, size_t _size);
-extern void abort(void);
-extern int atexit(void (*_func)(void));
-extern void exit(int _status);
-extern void _Exit(int _status);
-extern char* getenv(const char *_name);
-extern int setenv(const char *_name, const char *_value, int _overwrite);
-extern int unsetenv(const char *_name);
-extern int putenv(char *_string);
-extern int system(const char *_string);
-extern void* bsearch(const void *_key, const void *_base,
-                       size_t _nmemb, size_t _size,
-                       int (*_compar)(const void *, const void *));
-extern void qsort(void *_base, size_t _nmemb, size_t _size,
-                       int (*_compar)(const void *, const void *));
-extern int abs(int _j);
-extern div_t div(int _numer, int _denom);
-extern long labs(long _j);
-extern ldiv_t ldiv(long _numer, long _denom);
-extern int mblen(const char *_s, size_t _n);
-extern int mbtowc(wchar_t *_pwc, const char *_s, size_t _n);
-extern int wctomb(char *_s, wchar_t _wchar);
-extern size_t mbstowcs(wchar_t *_pwcs, const char *_s, size_t _n);
-extern size_t wcstombs(char *_s, const wchar_t *_pwcs, size_t _n);
-
-/* Extensions (not part of the standard) */
-
-#define atof(n)   strtod(n, (char **)NULL)
-#define atoi(n)   ((int)strtol(n, (char **)NULL, 10))
-#define atol(n)   strtol(n, (char **)NULL, 10)
-#define atoll(n)  strtoll(n, (char **)NULL, 10)
-#define mblen(s, n)   mbtowc((wchar_t *)0, s, n)
-
-#endif
diff --git a/lang/cem/libcc.ansi/headers/tgmath.h b/lang/cem/libcc.ansi/headers/tgmath.h
deleted file mode 100644 (file)
index 85114e1..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-/*
-    <tgmath.h> -- simple version used by "gimplify"
-
-    last edit:  2007-02-12  D A Gwyn
-*/
-
-/* XXX -- Can't be done right without compiler support; it *may* suffice to
-   use automatic coercion to type double with the <math.h> prototypes. */
-
-#include    <math.h>
-#include    <complex.h>