This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl 5.003_04: config_h.SH
[perl5.git] / config_h.SH
index 21cd2d9..f00588f 100755 (executable)
@@ -15,7 +15,7 @@ case "$0" in
 */*) cd `expr X$0 : 'X\(.*\)/'` ;;
 esac
 echo "Extracting config.h (with variable substitutions)"
-sed <<!GROK!THIS! >config.h -e 's!^#undef!/\*#define!' -e 's!^#un-def!#undef!'
+sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-def!#undef!'
 /*
  * This file was produced by running the config_h.SH script, which
  * gets its values from config.sh, which is generally produced by
@@ -51,6 +51,9 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef!/\*#define!' -e 's!^#un-def!#undef!'
 /* CAT2:
  *     This macro catenates 2 tokens together.
  */
+/* STRINGIFY:
+ *     This macro surrounds its token with double quotes.
+ */
 #if $cpp_stuff == 1
 #define CAT2(a,b)a/**/b
 #define CAT3(a,b,c)a/**/b/**/c