* _POSIX_C_SOURCE=2 is redundant and _BSD_SOURCE makes ancient BSD have

precedence over POSIX/SUSv3 stuff and requires libbsd-compat which is
  something we don't desire; _GNU_SOURCE even in Linux libc5 always has
  included _POSIX_C_SOURCE=2 and BSD functions since at least Feb 1995.
* sync GNU/kFreeBSD with GNU/Linux, it uses glibc2

First mentioned and second response on inquiry by Bastian "waldi" Blank
Thanks!
This commit is contained in:
tg 2007-02-02 10:27:21 +00:00
parent 890da93291
commit 83b2f7d316

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
# $MirOS: src/bin/mksh/Build.sh,v 1.148 2007/01/28 20:05:29 tg Exp $ # $MirOS: src/bin/mksh/Build.sh,v 1.149 2007/02/02 10:27:21 tg Exp $
#- #-
# Env: CC, CFLAGS, CPP, CPPFLAGS, LDFLAGS, LIBS, NOWARN, NROFF, TARGET_OS # Env: CC, CFLAGS, CPP, CPPFLAGS, LDFLAGS, LIBS, NOWARN, NROFF, TARGET_OS
# CPPFLAGS recognised: MKSH_SMALL MKSH_NOPWNAM # CPPFLAGS recognised: MKSH_SMALL MKSH_NOPWNAM
@ -188,18 +188,16 @@ DragonFly)
FreeBSD) FreeBSD)
;; ;;
GNU/kFreeBSD) GNU/kFreeBSD)
# XXX probably the same as Linux?
echo Warning: mksh has not yet been ported to $TARGET_OS >&2 echo Warning: mksh has not yet been ported to $TARGET_OS >&2
echo but should work. If you can provide a shell account >&2 echo but should work. If you can provide a shell account >&2
echo to the developer, the situation may improve. >&2 echo to the developer, the situation may improve. >&2
CPPFLAGS="$CPPFLAGS -D_BSD_SOURCE" CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64"
;; ;;
Interix) Interix)
CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE" CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
;; ;;
Linux) Linux)
CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=2 -D_BSD_SOURCE -D_GNU_SOURCE" CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64"
CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64"
test def = $s && s=pam test def = $s && s=pam
: ${HAVE_REVOKE=0} : ${HAVE_REVOKE=0}
;; ;;