* shuffle around _*_SOURCE definitions (sh.h -> Build.sh), per OS
* Tonnerre Lombard reports that Solaris 10 needs _BSD_SOURCE
This commit is contained in:
parent
9e838e765c
commit
5726a50ab9
7
Build.sh
7
Build.sh
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# $MirOS: src/bin/mksh/Build.sh,v 1.24 2006/01/27 00:50:12 tg Exp $
|
||||
# $MirOS: src/bin/mksh/Build.sh,v 1.25 2006/03/19 18:06:31 tg Exp $
|
||||
#-
|
||||
# This script recognises CC, CFLAGS, CPPFLAGS, LDFLAGS, LIBS and NROFF.
|
||||
|
||||
@ -51,13 +51,18 @@ case "`uname -s 2>/dev/null || uname`" in
|
||||
Darwin)
|
||||
LDSTATIC= # never works
|
||||
;;
|
||||
Interix)
|
||||
CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
|
||||
;;
|
||||
Linux)
|
||||
# Hello Mr Drepper, we all like you too...</sarcasm>
|
||||
SRCS="$SRCS compat.c strlfun.c"
|
||||
CPPFLAGS="$CPPFLAGS -D_POSIX_SOURCE"
|
||||
LDSTATIC= # glibc dlopens the PAM library with getpwnam at runtime
|
||||
;;
|
||||
SunOS)
|
||||
SRCS="$SRCS compat.c"
|
||||
CPPFLAGS="$CPPFLAGS -D_BSD_SOURCE"
|
||||
CFLAGS="$CFLAGS -Wno-char-subscripts"
|
||||
LDSTATIC= # alternatively you need libdl... same suckage as above
|
||||
;;
|
||||
|
10
sh.h
10
sh.h
@ -8,18 +8,10 @@
|
||||
/* $OpenBSD: c_test.h,v 1.4 2004/12/20 11:34:26 otto Exp $ */
|
||||
/* $OpenBSD: tty.h,v 1.5 2004/12/20 11:34:26 otto Exp $ */
|
||||
|
||||
#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.24 2006/01/29 20:04:53 tg Exp $"
|
||||
|
||||
#if defined(__INTERIX) && !defined(_ALL_SOURCE)
|
||||
#define _ALL_SOURCE
|
||||
#endif
|
||||
#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.25 2006/03/19 18:06:32 tg Exp $"
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
#if defined(__gnu_linux__) && !defined(_POSIX_SOURCE)
|
||||
#define _POSIX_SOURCE
|
||||
#endif
|
||||
|
||||
#ifndef __RCSID
|
||||
#define __RCSID(x) static const char __rcsid[] __attribute__((used)) = (x)
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user