* 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
|
#!/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.
|
# This script recognises CC, CFLAGS, CPPFLAGS, LDFLAGS, LIBS and NROFF.
|
||||||
|
|
||||||
@ -51,13 +51,18 @@ case "`uname -s 2>/dev/null || uname`" in
|
|||||||
Darwin)
|
Darwin)
|
||||||
LDSTATIC= # never works
|
LDSTATIC= # never works
|
||||||
;;
|
;;
|
||||||
|
Interix)
|
||||||
|
CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
|
||||||
|
;;
|
||||||
Linux)
|
Linux)
|
||||||
# Hello Mr Drepper, we all like you too...</sarcasm>
|
# Hello Mr Drepper, we all like you too...</sarcasm>
|
||||||
SRCS="$SRCS compat.c strlfun.c"
|
SRCS="$SRCS compat.c strlfun.c"
|
||||||
|
CPPFLAGS="$CPPFLAGS -D_POSIX_SOURCE"
|
||||||
LDSTATIC= # glibc dlopens the PAM library with getpwnam at runtime
|
LDSTATIC= # glibc dlopens the PAM library with getpwnam at runtime
|
||||||
;;
|
;;
|
||||||
SunOS)
|
SunOS)
|
||||||
SRCS="$SRCS compat.c"
|
SRCS="$SRCS compat.c"
|
||||||
|
CPPFLAGS="$CPPFLAGS -D_BSD_SOURCE"
|
||||||
CFLAGS="$CFLAGS -Wno-char-subscripts"
|
CFLAGS="$CFLAGS -Wno-char-subscripts"
|
||||||
LDSTATIC= # alternatively you need libdl... same suckage as above
|
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: 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 $ */
|
/* $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 $"
|
#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.25 2006/03/19 18:06:32 tg Exp $"
|
||||||
|
|
||||||
#if defined(__INTERIX) && !defined(_ALL_SOURCE)
|
|
||||||
#define _ALL_SOURCE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
|
|
||||||
#if defined(__gnu_linux__) && !defined(_POSIX_SOURCE)
|
|
||||||
#define _POSIX_SOURCE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef __RCSID
|
#ifndef __RCSID
|
||||||
#define __RCSID(x) static const char __rcsid[] __attribute__((used)) = (x)
|
#define __RCSID(x) static const char __rcsid[] __attribute__((used)) = (x)
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user