more C standard progress
There was a transcription error in the comments in cstd.h for the standard list of header files, where only the description remained for <stdlib.h>, not the name of the file itself. Remove several extraneous inclusions of the standard C99 headers. Tested on the following afterwards: Linux (using hints/linux.370) including tty, curses, qt6, and X11 macOS (using hints/macOS.370) including tty, curses, qt5, and X11 Windows MSYS2 using sys/windows/GNUmakefile Windows Visual Studio using sys/windows/Makefile.nmake msdos cross-compile on Ubuntu using djgpp cross-compiler
This commit is contained in:
@@ -27,9 +27,9 @@
|
||||
* <stddef.h> Common macro definitions
|
||||
* <stdint.h> (C99) Fixed-width integer types
|
||||
* <stdio.h> Input/output program utilities
|
||||
*
|
||||
* General utilities: memory management, program utilities, string
|
||||
* conversions, random numbers, algorithms
|
||||
* <stdlib.h> General utilities: memory management,
|
||||
* program utilities, string conversions,
|
||||
* random numbers, algorithms
|
||||
* <string.h> String handling
|
||||
* <tgmath.h> (C99) Type-generic math (macros wrapping math.h and
|
||||
* complex.h)
|
||||
@@ -51,13 +51,17 @@
|
||||
*
|
||||
*/
|
||||
#if !defined(__cplusplus)
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
#include <ctype.h>
|
||||
#include <time.h>
|
||||
|
||||
#else /* !__cplusplus */
|
||||
/* for FILE */
|
||||
#include <stdio.h>
|
||||
#endif /* !__cplusplus */
|
||||
#endif /* CSTD_H */
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
#ifndef GLOBAL_H
|
||||
#define GLOBAL_H
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/*
|
||||
* Files expected to exist in the playground directory (possibly inside
|
||||
* a dlb container file).
|
||||
|
||||
@@ -111,33 +111,21 @@
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 7)
|
||||
#include <sys/types.h>
|
||||
#include <stdlib.h>
|
||||
#ifdef strcmpi
|
||||
#undef strcmpi
|
||||
#endif
|
||||
#include <string.h> /* Provides prototypes of strncmpi(), etc. */
|
||||
#include <conio.h>
|
||||
#include <io.h>
|
||||
#include <direct.h>
|
||||
#define SIG_RET_TYPE void(__cdecl *)(int)
|
||||
#define M(c) ((char) (0x80 | (c)))
|
||||
#define vprintf printf
|
||||
#define vfprintf fprintf
|
||||
#define vsprintf sprintf
|
||||
#endif
|
||||
|
||||
#if defined(__BORLANDC__) && defined(STRNCMPI)
|
||||
#include <string.h> /* Provides prototypes of strncmpi(), etc. */
|
||||
#endif
|
||||
|
||||
#if defined(__DJGPP__)
|
||||
#define _NAIVE_DOS_REGS
|
||||
#include <stdlib.h>
|
||||
#include <string.h> /* Provides prototypes of strncmpi(), etc. */
|
||||
#ifndef M
|
||||
#define M(c) ((char) (0x80 | (c)))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* On the VMS and unix, this option controls whether a delay is done by
|
||||
@@ -226,10 +214,6 @@
|
||||
#define HLOCK "NHPERM"
|
||||
#endif
|
||||
|
||||
#ifndef AMIGA
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
/* the high quality random number routines */
|
||||
#ifndef USE_ISAAC64
|
||||
# ifdef RANDOM
|
||||
|
||||
@@ -302,8 +302,6 @@
|
||||
|
||||
#if defined(BSD) || defined(ULTRIX)
|
||||
#include <sys/time.h>
|
||||
#else
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
/* these might be needed for include/system.h;
|
||||
@@ -324,10 +322,7 @@
|
||||
#define SHELL /* do not delete the '!' command */
|
||||
#endif
|
||||
|
||||
/* #include "system.h" */
|
||||
|
||||
#if defined(POSIX_TYPES) || defined(__GNUC__)
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -213,7 +213,6 @@ PANICTRACE_GDB=2 #at conclusion of panic, show a call traceback and then
|
||||
#include <types.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
#include <signal.h>
|
||||
#include <stat.h>
|
||||
#include <errno.h>
|
||||
@@ -246,8 +245,6 @@ typedef int32_t off_t;
|
||||
#endif
|
||||
#endif /* _DECC_V4_SOURCE */
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#ifndef VMSVSI
|
||||
#if 0 /* <file.h> is missing for old gcc versions; skip it to save time */
|
||||
#include <file.h>
|
||||
|
||||
@@ -165,8 +165,6 @@ typedef SSIZE_T ssize_t;
|
||||
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#ifdef __BORLANDC__
|
||||
#undef randomize
|
||||
#undef random
|
||||
@@ -185,10 +183,6 @@ typedef SSIZE_T ssize_t;
|
||||
#endif
|
||||
|
||||
#define NO_SIGNAL
|
||||
|
||||
/* Time stuff */
|
||||
#include <time.h>
|
||||
|
||||
#define USE_STDARG
|
||||
|
||||
/* Use the high quality random number routines. */
|
||||
|
||||
Reference in New Issue
Block a user