Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit dc6612b

Browse files
committed
Configure: fix doubleinfbytes=undef ...
#define DOUBLEINFBYTES undef is illegal Note that the undef in config_h.SH needs to have a space before and after, no tab! Needs to be backported.
1 parent bdad759 commit dc6612b

File tree

3 files changed

+32
-29
lines changed

3 files changed

+32
-29
lines changed

Configure

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20704,6 +20704,7 @@ int main(int argc, char *argv[]) {
2070420704
return 0;
2070520705
}
2070620706
EOP
20707+
empty=0x0
2070720708
set try
2070820709
if eval $compile; then
2070920710
doubleinfbytes=`$run ./try 1`
@@ -20750,12 +20751,12 @@ else
2075020751
doublenanbytes='0x00, 0x00, 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00'
2075120752
;;
2075220753
9|10|11|12|13|14) # VAX/Cray/IBM floating point formats, no inf/nan.
20753-
doubleinfbytes=$undef
20754-
doublenanbytes=$undef
20754+
doubleinfbytes=$empty
20755+
doublenanbytes=$empty
2075520756
;;
2075620757
*) # No idea.
20757-
doubleinfbytes=$undef
20758-
doublenanbytes=$undef
20758+
doubleinfbytes=$empty
20759+
doublenanbytes=$empty
2075920760
;;
2076020761
esac
2076120762
case "$longdblkind" in
@@ -20778,8 +20779,8 @@ else
2077820779
longdblnanbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
2077920780
;;
2078020781
*) # No idea.
20781-
longdblinfbytes=$undef
20782-
longdblnanbytes=$undef
20782+
longdblinfbytes=$empty
20783+
longdblnanbytes=$empty
2078320784
;;
2078420785
esac
2078520786
;;
@@ -20794,8 +20795,8 @@ else
2079420795
longdblnanbytes='0x7f, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
2079520796
;;
2079620797
*) # No idea.
20797-
longdblinfbytes=$undef
20798-
longdblnanbytes=$undef
20798+
longdblinfbytes=$empty
20799+
longdblnanbytes=$empty
2079920800
;;
2080020801
esac
2080120802
;;
@@ -20816,27 +20817,27 @@ else
2081620817
longdblnanbytes='0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00'
2081720818
;;
2081820819
9|10|11|12|13|14) # VAX/Cray/IBM floating point formats, no inf/nan.
20819-
longdblinfbytes=$undef
20820-
longdblnanbytes=$undef
20820+
longdblinfbytes=$empty
20821+
longdblnanbytes=$empty
2082120822
;;
2082220823
*) # No idea.
20823-
longdblinfbytes=$undef
20824-
longdblnanbytes=$undef
20824+
longdblinfbytes=$empty
20825+
longdblnanbytes=$empty
2082520826
;;
2082620827
esac
2082720828
fi
2082820829
# In case the program crashed the values are empty, turn them undef.
2082920830
case "$doubleinfbytes" in
20830-
'') doubleinfbytes=$undef ;;
20831+
'') doubleinfbytes=$empty ;;
2083120832
esac
2083220833
case "$doublenanbytes" in
20833-
'') doublenanbytes=$undef ;;
20834+
'') doublenanbytes=$empty ;;
2083420835
esac
2083520836
case "$longdblinfbytes" in
20836-
'') longdblinfbytes=$undef ;;
20837+
'') longdblinfbytes=$empty ;;
2083720838
esac
2083820839
case "$longdblnanbytes" in
20839-
'') longdblnanbytes=$undef ;;
20840+
'') longdblnanbytes=$empty ;;
2084020841
esac
2084120842
$rm_try
2084220843

@@ -20863,7 +20864,7 @@ set try
2086320864
if eval $compile; then
2086420865
doublemantbits=`$run ./try`
2086520866
else
20866-
doublemantbits="$undef"
20867+
doublemantbits="$empty"
2086720868
fi
2086820869
$rm_try
2086920870

@@ -20905,7 +20906,7 @@ set try
2090520906
if eval $compile; then
2090620907
longdblmantbits=`$run ./try`
2090720908
else
20908-
longdblmantbits="$undef"
20909+
longdblmantbits="$empty"
2090920910
fi
2091020911
$rm_try
2091120912

@@ -20920,7 +20921,7 @@ else
2092020921
if test "X$nvsize" = "X$longdblsize"; then
2092120922
nvmantbits="$longdblmantbits"
2092220923
else
20923-
nvmantbits="$undef"
20924+
nvmantbits="$empty"
2092420925
fi
2092520926
fi
2092620927
fi

config_h.SH

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ case "$CONFIG_H" in
4242
already-done) echo "Not re-extracting config.h" ;;
4343
*)
4444
echo "Extracting $CONFIG_H (with variable substitutions)"
45-
sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-def!#undef!'
45+
sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-def!#undef!' -e 's!^#define \(.*\) undef !#undef \1!'
4646
/* This file was produced by running the config_h.SH script, which
4747
* gets its values from $CONFIG_SH, which is generally produced by
4848
* running Configure.
@@ -4940,10 +4940,11 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
49404940
* This symbol, if defined, is a comma-separated list of
49414941
* hexadecimal bytes (0xHH) for the long double precision not-a-number.
49424942
*/
4943-
#define DOUBLEINFBYTES $doubleinfbytes /**/
4944-
#define DOUBLENANBYTES $doublenanbytes /**/
4945-
#define LONGDBLINFBYTES $longdblinfbytes /**/
4946-
#define LONGDBLNANBYTES $longdblnanbytes /**/
4943+
/* Do not change the whitespace here! */
4944+
#define DOUBLEINFBYTES $doubleinfbytes /**/
4945+
#define DOUBLENANBYTES $doublenanbytes /**/
4946+
#define LONGDBLINFBYTES $longdblinfbytes /**/
4947+
#define LONGDBLNANBYTES $longdblnanbytes /**/
49474948
49484949
/* PERL_PRIfldbl:
49494950
* This symbol, if defined, contains the string used by stdio to

uconfig.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4895,10 +4895,11 @@
48954895
* This symbol, if defined, is a comma-separated list of
48964896
* hexadecimal bytes (0xHH) for the long double precision not-a-number.
48974897
*/
4898-
#define DOUBLEINFBYTES 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x7f /**/
4899-
#define DOUBLENANBYTES 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x7f /**/
4900-
#define LONGDBLINFBYTES 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /**/
4901-
#define LONGDBLNANBYTES 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /**/
4898+
/* Do not change the whitespace here! */
4899+
#define DOUBLEINFBYTES 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x7f /**/
4900+
#define DOUBLENANBYTES 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x7f /**/
4901+
#define LONGDBLINFBYTES 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /**/
4902+
#define LONGDBLNANBYTES 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /**/
49024903

49034904
/* PERL_PRIfldbl:
49044905
* This symbol, if defined, contains the string used by stdio to
@@ -5462,6 +5463,6 @@
54625463
#endif
54635464

54645465
/* Generated from:
5465-
* e013bc0d68c81922e2d705bcae12699014b3b7be2ea930bb7ba15d530e8b03a7 config_h.SH
5466+
* bdf8c287b1124deeaebb23cde724d74db1836c39645b19a574487a858153c7f5 config_h.SH
54665467
* 8c426d198fb3d779629e9652bcb55fc5d6e56b80689f6d1e583eb377755875e1 uconfig.sh
54675468
* ex: set ro: */

0 commit comments

Comments
 (0)