Skip to content

Commit 072cbea

Browse files
seanmvfonov
authored andcommitted
Removed checks for long-standard or long-obsolete headers
Many of these header have been standardized since C89, others have been obsolete forever. This started as fixing some -Wundef warnings, but then I thought I'd clean up more.
1 parent 1413b02 commit 072cbea

File tree

17 files changed

+1
-64
lines changed

17 files changed

+1
-64
lines changed

CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,24 +183,18 @@ ELSE(HAVE_CLOCK_GETTIME_RT)
183183
ENDIF(HAVE_CLOCK_GETTIME_RT)
184184

185185
INCLUDE(CheckIncludeFiles)
186-
CHECK_INCLUDE_FILES(float.h HAVE_FLOAT_H)
187186
CHECK_INCLUDE_FILES(sys/dir.h HAVE_SYS_DIR_H)
188187
CHECK_INCLUDE_FILES(sys/ndir.h HAVE_SYS_NDIR_H)
189188
CHECK_INCLUDE_FILES(sys/stat.h HAVE_SYS_STAT_H)
190189
CHECK_INCLUDE_FILES(sys/types.h HAVE_SYS_TYPES_H)
191190
CHECK_INCLUDE_FILES(sys/wait.h HAVE_SYS_WAIT_H)
192191
CHECK_INCLUDE_FILES(sys/time.h HAVE_SYS_TIME_H)
193-
CHECK_INCLUDE_FILES(time.h HAVE_TIME_H)
194-
CHECK_INCLUDE_FILES(values.h HAVE_VALUES_H)
195192
CHECK_INCLUDE_FILES(unistd.h HAVE_UNISTD_H)
196193
CHECK_INCLUDE_FILES(dirent.h HAVE_DIRENT_H)
197-
CHECK_INCLUDE_FILES(memory.h HAVE_MEMORY_H)
198-
CHECK_INCLUDE_FILES(stdlib.h HAVE_STDLIB_H)
199194
CHECK_INCLUDE_FILES(fcntl.h HAVE_FCNTL_H)
200195
CHECK_INCLUDE_FILES(dlfcn.h HAVE_DLFCN_H)
201196
CHECK_INCLUDE_FILES(vfork.h HAVE_VFORK_H)
202197
CHECK_INCLUDE_FILES(inttypes.h HAVE_INTTYPES_H)
203-
CHECK_INCLUDE_FILES(string.h HAVE_STRING_H)
204198
CHECK_INCLUDE_FILES(strings.h HAVE_STRINGS_H)
205199
CHECK_INCLUDE_FILES(pwd.h HAVE_PWD_H)
206200
CHECK_INCLUDE_FILES(sys/select.h HAVE_SYS_SELECT_H)

config.h.cmake

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222

2323
#cmakedefine HAVE_MKSTEMP 1
2424
#cmakedefine HAVE_STRERROR 1
25-
#cmakedefine HAVE_FLOAT_H 1
2625

2726
#cmakedefine HAVE_COPYSIGN 1
2827
#cmakedefine HAVE_ROUND 1
@@ -35,36 +34,31 @@
3534
#cmakedefine HAVE_INT16_T 1
3635
#cmakedefine HAVE_INT32_T 1
3736
#cmakedefine HAVE_INTTYPES_H 1
38-
#cmakedefine HAVE_MEMORY_H 1
3937
#cmakedefine HAVE_MKSTEMP 1
4038
#cmakedefine HAVE_NDIR_H 1
4139
#cmakedefine HAVE_POPEN 1
4240
#cmakedefine HAVE_PWD_H 1
4341
#cmakedefine HAVE_SELECT 1
4442
#cmakedefine HAVE_STDINT_H 1
45-
#cmakedefine HAVE_STDLIB_H 1
4643
#cmakedefine HAVE_STRDUP 1
4744
#cmakedefine HAVE_SYSCONF 1
4845
#cmakedefine HAVE_SYSTEM 1
4946
#cmakedefine HAVE_SYS_DIR_H 1
5047
#cmakedefine HAVE_SYS_NDIR_H 1
5148
#cmakedefine HAVE_SYS_STAT_H 1
5249
#cmakedefine HAVE_SYS_TIME_H 1
53-
#cmakedefine HAVE_TIME_H 1
5450
#cmakedefine HAVE_SYS_TYPES_H 1
5551
#cmakedefine HAVE_SYS_WAIT_H 1
5652
#cmakedefine HAVE_SYS_SELECT_H 1
5753
#cmakedefine HAVE_TEMPNAM 1
5854
#cmakedefine HAVE_TMPNAM 1
5955
#cmakedefine HAVE_UNISTD_H 1
60-
#cmakedefine HAVE_VALUES_H 1
6156
#cmakedefine HAVE_VFORK 1
6257
#cmakedefine HAVE_VFORK_H 1
6358
#cmakedefine HAVE_WORKING_FORK 1
6459
#cmakedefine HAVE_WORKING_VFORK 1
6560
#cmakedefine HAVE_ZLIB 1
6661
#cmakedefine HAVE_STRINGS_H 1
67-
#cmakedefine HAVE_STRING_H 1
6862
#cmakedefine HAVE_SRAND48 1
6963
#cmakedefine HAVE_DRAND48 1
7064
#cmakedefine HAVE_SLEEP 1

libcommon/ParseArgv.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,9 @@
2525

2626
#include <stdio.h>
2727

28-
#ifdef HAVE_STDLIB_H
2928
#include <stdlib.h>
30-
#endif
3129

32-
#ifdef HAVE_STRING_H
3330
#include <string.h>
34-
#endif
3531

3632
#ifdef HAVE_INTTYPES_H
3733
#include <inttypes.h>

libcommon/minc_config.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,13 @@
55
#include <stdio.h>
66
#include <ctype.h>
77

8-
#ifdef HAVE_STRING_H
98
#include <string.h>
10-
#endif
119

1210
#ifdef HAVE_STRINGS_H
1311
#include <strings.h>
1412
#endif
1513

16-
17-
#ifdef HAVE_STDLIB_H
1814
#include <stdlib.h>
19-
#endif
2015

2116
#include "minc_config.h"
2217

libcommon/time_stamp.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,7 @@
6262
#include "config.h"
6363
#endif /*HAVE_CONFIG_H*/
6464

65-
#ifdef HAVE_STRING_H
6665
#include <string.h>
67-
#endif
6866
#include <stdio.h>
6967

7068
/* MS Visual Studio 12 and below.

libsrc/config.h.msvc-win32

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@
99
#define _CONFIG_H_ 1
1010

1111
#define HAVE_FCNTL_H 1
12-
#define HAVE_FLOAT_H 1
13-
#define HAVE_MEMORY_H 1
1412
#define HAVE_STDINT_H 1
15-
#define HAVE_STDLIB_H 1
16-
#define HAVE_STRING_H 1
1713
#define HAVE_SYS_STAT_H 1
1814
#define HAVE_SYS_TYPES_H 1
1915
#define HAVE_TEMPNAM 1

libsrc2/dimension.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919

2020
#include <math.h>
2121

22-
#ifdef HAVE_STRING_H
2322
#include <string.h>
24-
#endif /*HAVE_STRING_H*/
2523

2624
/**
2725
Figure out whether a dimension is associated with a volume.

testdir/icv.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414

1515
#include <minc.h>
1616

17-
#ifdef HAVE_STRING_H
1817
#include <string.h>
19-
#endif
2018

2119
#define TRUE 1
2220
#define FALSE 0

testdir/icv_dim.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414

1515
#include <minc.h>
1616

17-
#ifdef HAVE_STRING_H
1817
#include <string.h>
19-
#endif
2018

2119
#define TRUE 1
2220
#define FALSE 0

testdir/icv_dim1.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414

1515
#include <minc.h>
1616

17-
#ifdef HAVE_STRING_H
1817
#include <string.h>
19-
#endif
2018

2119
#define TRUE 1
2220
#define FALSE 0

0 commit comments

Comments
 (0)