Skip to content

Commit ee4b9be

Browse files
author
Andy C
committed
[configure refactor] C and C++ header gen both use echo_libc function
1 parent 6bc43e8 commit ee4b9be

File tree

1 file changed

+9
-19
lines changed

1 file changed

+9
-19
lines changed

configure

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,13 @@ echo_libc() {
421421
echo '#define HAVE_GLOB_PERIOD 0'
422422
echo '#define GLOB_PERIOD 0 /* define bit flag to have no effect */'
423423
fi
424+
425+
# Used by cpp/core.cc
426+
if test "$have_pwent" = 1; then
427+
echo '#define HAVE_PWENT 1'
428+
else
429+
echo '/* #undef HAVE_PWENT */'
430+
fi
424431
}
425432

426433
# Note: this is only for the OLD oils-ref tarball
@@ -525,25 +532,8 @@ echo_cpp() {
525532

526533
echo
527534

528-
if test "$have_fnm_extmatch" = 1; then
529-
echo '#define HAVE_FNM_EXTMATCH 1'
530-
else
531-
echo '#define HAVE_FNM_EXTMATCH 0'
532-
fi
533-
534-
if test "$have_glob_period" = 1; then
535-
echo '#define HAVE_GLOB_PERIOD 1'
536-
else
537-
echo '#define HAVE_GLOB_PERIOD 0'
538-
echo '#define GLOB_PERIOD 0 /* define bit flag to have no effect */'
539-
fi
540-
541-
# Used by cpp/core.cc
542-
if test "$have_pwent" = 1; then
543-
echo '#define HAVE_PWENT 1'
544-
else
545-
echo '/* #undef HAVE_PWENT */'
546-
fi
535+
# Shared with detect_c_language
536+
echo_libc
547537
}
548538

549539
# Another way of working: set detected-config.mk ?

0 commit comments

Comments
 (0)