Skip to content

Commit 79ad520

Browse files
committed
Rely on C89 "const"
The metaconfig probe for <db.h> previously relied on the d_const symbol set by the "const" probe, so generating Configure here has been done against metaconfig commit 1204d46 which changes that. Thanks to khw++ for pointing out this oversight in my attempt last year to make the codebase rely on C89.
1 parent daced5a commit 79ad520

24 files changed

+3
-153
lines changed

.metaconf-exclusions.txt

+1
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ I_LIMITS
2424
I_STDARG
2525
index
2626
rindex
27+
const

Configure

-35
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,6 @@ d_clearenv=''
410410
d_closedir=''
411411
d_void_closedir=''
412412
d_cmsghdr_s=''
413-
d_const=''
414413
d_copysign=''
415414
d_copysignl=''
416415
d_cplusplus=''
@@ -12054,27 +12053,6 @@ case "$d_cmsghdr_s" in
1205412053
*) echo "No, it doesn't." ;;
1205512054
esac
1205612055

12057-
: check for const keyword
12058-
echo " "
12059-
echo 'Checking to see if your C compiler knows about "const"...' >&4
12060-
$cat >const.c <<'EOCP'
12061-
typedef struct spug { int drokk; } spug;
12062-
int main()
12063-
{
12064-
const char *foo;
12065-
const spug y = { 0 };
12066-
}
12067-
EOCP
12068-
if $cc -c $ccflags const.c >/dev/null 2>&1 ; then
12069-
val="$define"
12070-
echo "Yup, it does."
12071-
else
12072-
val="$undef"
12073-
echo "Nope, it doesn't."
12074-
fi
12075-
set d_const
12076-
eval $setvar
12077-
1207812056
: see if copysign exists
1207912057
set copysign d_copysign
1208012058
eval $inlibc
@@ -19856,10 +19834,6 @@ $define)
1985619834
echo " "
1985719835
echo "Checking Berkeley DB version ..." >&4
1985819836
$cat >try.c <<EOCP
19859-
#$d_const HASCONST
19860-
#ifndef HASCONST
19861-
#define const
19862-
#endif
1986319837
#include <sys/types.h>
1986419838
#include <stdio.h>
1986519839
#$i_stdlib I_STDLIB
@@ -19950,10 +19924,6 @@ define)
1995019924
echo " "
1995119925
echo "Checking return type needed for hash for Berkeley DB ..." >&4
1995219926
$cat >try.c <<EOCP
19953-
#$d_const HASCONST
19954-
#ifndef HASCONST
19955-
#define const
19956-
#endif
1995719927
#include <sys/types.h>
1995819928
#include <db.h>
1995919929

@@ -19994,10 +19964,6 @@ define)
1999419964
echo " "
1999519965
echo "Checking return type needed for prefix for Berkeley DB ..." >&4
1999619966
cat >try.c <<EOCP
19997-
#$d_const HASCONST
19998-
#ifndef HASCONST
19999-
#define const
20000-
#endif
2000119967
#include <sys/types.h>
2000219968
#include <db.h>
2000319969

@@ -23843,7 +23809,6 @@ d_class='$d_class'
2384323809
d_clearenv='$d_clearenv'
2384423810
d_closedir='$d_closedir'
2384523811
d_cmsghdr_s='$d_cmsghdr_s'
23846-
d_const='$d_const'
2384723812
d_copysign='$d_copysign'
2384823813
d_copysignl='$d_copysignl'
2384923814
d_cplusplus='$d_cplusplus'

Cross/config.sh-arm-linux

-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ d_class='undef'
144144
d_clearenv='define'
145145
d_closedir='define'
146146
d_cmsghdr_s='define'
147-
d_const='define'
148147
d_copysign='undef'
149148
d_copysignl='define'
150149
d_cplusplus='undef'

Cross/config.sh-arm-linux-n770

-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ d_class='undef'
143143
d_clearenv='define'
144144
d_closedir='define'
145145
d_cmsghdr_s='define'
146-
d_const='define'
147146
d_copysign='undef'
148147
d_copysignl='define'
149148
d_cplusplus='undef'

NetWare/config.wc

-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ d_class='undef'
131131
d_clearenv='undef'
132132
d_closedir='define'
133133
d_cmsghdr_s='undef'
134-
d_const='define'
135134
d_copysign='undef'
136135
d_copysignl='undef'
137136
d_cplusplus='undef'

NetWare/config_H.wc

-11
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,6 @@
6868
*/
6969
#define HAS_CHSIZE /**/
7070

71-
/* HASCONST:
72-
* This symbol, if defined, indicates that this C compiler knows about
73-
* the const type. There is no need to actually test for that symbol
74-
* within your programs. The mere use of the "const" keyword will
75-
* trigger the necessary tests.
76-
*/
77-
#define HASCONST /**/
78-
#ifndef HASCONST
79-
#define const
80-
#endif
81-
8271
/* HAS_CRYPT:
8372
* This symbol, if defined, indicates that the crypt routine is available
8473
* to encrypt passwords and the like.

Porting/Glossary

-5
Original file line numberDiff line numberDiff line change
@@ -584,11 +584,6 @@ d_cmsghdr_s (d_cmsghdr_s.U):
584584
This variable conditionally defines the HAS_STRUCT_CMSGHDR symbol,
585585
which indicates that the struct cmsghdr is supported.
586586

587-
d_const (d_const.U):
588-
This variable conditionally defines the HASCONST symbol, which
589-
indicates to the C program that this C compiler knows about the
590-
const type.
591-
592587
d_copysign (d_copysign.U):
593588
This variable conditionally defines the HAS_COPYSIGN symbol, which
594589
indicates to the C program that the copysign() routine is available.

Porting/config.sh

-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ d_class='undef'
158158
d_clearenv='define'
159159
d_closedir='define'
160160
d_cmsghdr_s='define'
161-
d_const='define'
162161
d_copysign='define'
163162
d_copysignl='define'
164163
d_cplusplus='undef'

Porting/config_H

-11
Original file line numberDiff line numberDiff line change
@@ -1483,17 +1483,6 @@
14831483
*/
14841484
#define HAS_BACKTRACE /**/
14851485

1486-
/* HASCONST:
1487-
* This symbol, if defined, indicates that this C compiler knows about
1488-
* the const type. There is no need to actually test for that symbol
1489-
* within your programs. The mere use of the "const" keyword will
1490-
* trigger the necessary tests.
1491-
*/
1492-
#define HASCONST /**/
1493-
#ifndef HASCONST
1494-
#define const
1495-
#endif
1496-
14971486
/* HAS_CSH:
14981487
* This symbol, if defined, indicates that the C-shell exists.
14991488
*/

config_h.SH

-11
Original file line numberDiff line numberDiff line change
@@ -1514,17 +1514,6 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
15141514
*/
15151515
#$d_backtrace HAS_BACKTRACE /**/
15161516
1517-
/* HASCONST:
1518-
* This symbol, if defined, indicates that this C compiler knows about
1519-
* the const type. There is no need to actually test for that symbol
1520-
* within your programs. The mere use of the "const" keyword will
1521-
* trigger the necessary tests.
1522-
*/
1523-
#$d_const HASCONST /**/
1524-
#ifndef HASCONST
1525-
#define const
1526-
#endif
1527-
15281517
/* HAS_CSH:
15291518
* This symbol, if defined, indicates that the C-shell exists.
15301519
*/

configure.com

-1
Original file line numberDiff line numberDiff line change
@@ -5969,7 +5969,6 @@ $ WC "d_chsize='undef'"
59695969
$ WC "d_class='undef'"
59705970
$ WC "d_closedir='define'"
59715971
$ WC "d_cmsghdr_s='undef'"
5972-
$ WC "d_const='define'"
59735972
$ WC "d_copysign='" + d_copysign + "'"
59745973
$ WC "d_copysignl='define'"
59755974
$ WC "d_cplusplus='" + d_cplusplus + "'"

plan9/config.plan9

-11
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,6 @@
110110
*/
111111
/*#define HAS_CHSIZE / **/
112112

113-
/* HASCONST:
114-
* This symbol, if defined, indicates that this C compiler knows about
115-
* the const type. There is no need to actually test for that symbol
116-
* within your programs. The mere use of the "const" keyword will
117-
* trigger the necessary tests.
118-
*/
119-
#define HASCONST /**/
120-
#ifndef HASCONST
121-
#define const
122-
#endif
123-
124113
/* HAS_CUSERID:
125114
* This symbol, if defined, indicates that the cuserid routine is
126115
* available to get character login names.

plan9/config_h.sample

-11
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,6 @@
6868
*/
6969
/*#define HAS_CHSIZE / **/
7070

71-
/* HASCONST:
72-
* This symbol, if defined, indicates that this C compiler knows about
73-
* the const type. There is no need to actually test for that symbol
74-
* within your programs. The mere use of the "const" keyword will
75-
* trigger the necessary tests.
76-
*/
77-
#define HASCONST /**/
78-
#ifndef HASCONST
79-
#define const
80-
#endif
81-
8271
/* HAS_CUSERID:
8372
* This symbol, if defined, indicates that the cuserid routine is
8473
* available to get character login names.

plan9/config_sh.sample

-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ d_class='undef'
144144
d_clearenv='undef'
145145
d_closedir='define'
146146
d_cmsghdr_s='undef'
147-
d_const='define'
148147
d_copysign='undef'
149148
d_copysignl='undef'
150149
d_cplusplus='undef'

symbian/config.sh

-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ d_class='undef'
8989
d_clearenv='undef'
9090
d_closedir='undef'
9191
d_cmsghdr_s='undef'
92-
d_const='define'
9392
d_copysign='undef'
9493
d_copysignl='undef'
9594
d_cplusplus='undef'

uconfig.h

+2-13
Original file line numberDiff line numberDiff line change
@@ -1479,17 +1479,6 @@
14791479
*/
14801480
/*#define HAS_BACKTRACE / **/
14811481

1482-
/* HASCONST:
1483-
* This symbol, if defined, indicates that this C compiler knows about
1484-
* the const type. There is no need to actually test for that symbol
1485-
* within your programs. The mere use of the "const" keyword will
1486-
* trigger the necessary tests.
1487-
*/
1488-
/*#define HASCONST / **/
1489-
#ifndef HASCONST
1490-
#define const
1491-
#endif
1492-
14931482
/* HAS_CSH:
14941483
* This symbol, if defined, indicates that the C-shell exists.
14951484
*/
@@ -5230,6 +5219,6 @@
52305219
#endif
52315220

52325221
/* Generated from:
5233-
* 86429d6dea8cb2d81b30da9d916693eb4c04ebeb21969c8df6f470ac77cd5c92 config_h.SH
5234-
* fd30f4a36ebf71b0b366649cee58bb37d9d61863201e087e8f40e4ceae0abf1d uconfig.sh
5222+
* 875df2221ab768da0a87740ad45e12bbc9e3b483bfa1a913727e982350ad74cf config_h.SH
5223+
* 24ca29f990de08f8119ad2c15f060361b86fc407caab088289d7d5ac3e0f117a uconfig.sh
52355224
* ex: set ro: */

uconfig.sh

-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ d_class='undef'
8383
d_clearenv='undef'
8484
d_closedir='define'
8585
d_cmsghdr_s='undef'
86-
d_const='undef'
8786
d_copysign='undef'
8887
d_copysignl='undef'
8988
d_cplusplus='undef'

uconfig64.sh

-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ d_class='undef'
8383
d_clearenv='undef'
8484
d_closedir='define'
8585
d_cmsghdr_s='undef'
86-
d_const='undef'
8786
d_copysign='undef'
8887
d_copysignl='undef'
8988
d_cplusplus='undef'

win32/config.ce

-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ d_class='undef'
129129
d_clearenv='undef'
130130
d_closedir='define'
131131
d_cmsghdr_s='undef'
132-
d_const='define'
133132
d_copysign='undef'
134133
d_copysignl='undef'
135134
d_cplusplus='undef'

win32/config.gc

-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ d_class='undef'
131131
d_clearenv='undef'
132132
d_closedir='define'
133133
d_cmsghdr_s='undef'
134-
d_const='define'
135134
d_copysign='undef'
136135
d_copysignl='undef'
137136
d_cplusplus='undef'

win32/config.vc

-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ d_class='undef'
131131
d_clearenv='undef'
132132
d_closedir='define'
133133
d_cmsghdr_s='undef'
134-
d_const='define'
135134
d_copysign='undef'
136135
d_copysignl='undef'
137136
d_cplusplus='undef'

win32/config_H.ce

-11
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,6 @@
5050
*/
5151
#define HAS_CHSIZE /**/
5252

53-
/* HASCONST:
54-
* This symbol, if defined, indicates that this C compiler knows about
55-
* the const type. There is no need to actually test for that symbol
56-
* within your programs. The mere use of the "const" keyword will
57-
* trigger the necessary tests.
58-
*/
59-
#define HASCONST /**/
60-
#ifndef HASCONST
61-
#define const
62-
#endif
63-
6453
/* HAS_CUSERID:
6554
* This symbol, if defined, indicates that the cuserid routine is
6655
* available to get character login names.

win32/config_H.gc

-11
Original file line numberDiff line numberDiff line change
@@ -1474,17 +1474,6 @@
14741474
*/
14751475
/*#define HAS_BACKTRACE / **/
14761476

1477-
/* HASCONST:
1478-
* This symbol, if defined, indicates that this C compiler knows about
1479-
* the const type. There is no need to actually test for that symbol
1480-
* within your programs. The mere use of the "const" keyword will
1481-
* trigger the necessary tests.
1482-
*/
1483-
#define HASCONST /**/
1484-
#ifndef HASCONST
1485-
#define const
1486-
#endif
1487-
14881477
/* HAS_CSH:
14891478
* This symbol, if defined, indicates that the C-shell exists.
14901479
*/

win32/config_H.vc

-11
Original file line numberDiff line numberDiff line change
@@ -1467,17 +1467,6 @@
14671467
*/
14681468
/*#define HAS_BACKTRACE / **/
14691469

1470-
/* HASCONST:
1471-
* This symbol, if defined, indicates that this C compiler knows about
1472-
* the const type. There is no need to actually test for that symbol
1473-
* within your programs. The mere use of the "const" keyword will
1474-
* trigger the necessary tests.
1475-
*/
1476-
#define HASCONST /**/
1477-
#ifndef HASCONST
1478-
#define const
1479-
#endif
1480-
14811470
/* HAS_CSH:
14821471
* This symbol, if defined, indicates that the C-shell exists.
14831472
*/

0 commit comments

Comments
 (0)