зеркало из https://github.com/mozilla/pjs.git
Bugzilla Bug 263952: define the Solaris feature test macros for SUS
(XPG4v2) with extensions to eliminate compiler warnings about mmap64, shm_open and shm_unlink. The patch is contributed by Julien Pierre of Sun. r=wtc. Set NSPR version to 4.7 Beta.
This commit is contained in:
Родитель
3cea38d119
Коммит
3e09ea2c65
|
@ -684,8 +684,8 @@ test "$host_alias" != "$target_alias" &&
|
||||||
|
|
||||||
|
|
||||||
MOD_MAJOR_VERSION=4
|
MOD_MAJOR_VERSION=4
|
||||||
MOD_MINOR_VERSION=6
|
MOD_MINOR_VERSION=7
|
||||||
MOD_PATCH_VERSION=1
|
MOD_PATCH_VERSION=0
|
||||||
NSPR_MODNAME=nspr20
|
NSPR_MODNAME=nspr20
|
||||||
_HAVE_PTHREADS=
|
_HAVE_PTHREADS=
|
||||||
USE_PTHREADS=
|
USE_PTHREADS=
|
||||||
|
@ -4593,6 +4593,25 @@ EOF
|
||||||
|
|
||||||
cat >> confdefs.h <<\EOF
|
cat >> confdefs.h <<\EOF
|
||||||
#define HAVE_FCNTL_FILE_LOCKING 1
|
#define HAVE_FCNTL_FILE_LOCKING 1
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Define Solaris feature test macros. (See the standards(5) man page.)
|
||||||
|
# We conform to SUS (XPG4v2).
|
||||||
|
cat >> confdefs.h <<\EOF
|
||||||
|
#define _XOPEN_SOURCE 1
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat >> confdefs.h <<\EOF
|
||||||
|
#define _XOPEN_SOURCE_EXTENDED 1
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# But we also use interfaces and headers not defined by the standard.
|
||||||
|
cat >> confdefs.h <<\EOF
|
||||||
|
#define __EXTENSIONS__ 1
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat >> confdefs.h <<\EOF
|
||||||
|
#define HAVE_SOCKLEN_T 1
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
MDCPUCFG_H=_solaris.cfg
|
MDCPUCFG_H=_solaris.cfg
|
||||||
|
@ -4908,7 +4927,7 @@ case $target in
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
|
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
|
||||||
echo "configure:4912: checking for dlopen in -ldl" >&5
|
echo "configure:4931: checking for dlopen in -ldl" >&5
|
||||||
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
|
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
|
@ -4916,7 +4935,7 @@ else
|
||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-ldl $LIBS"
|
LIBS="-ldl $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 4920 "configure"
|
#line 4939 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* Override any gcc2 internal prototype to avoid an error. */
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
/* We use char because int might match the return type of a gcc2
|
/* We use char because int might match the return type of a gcc2
|
||||||
|
@ -4927,7 +4946,7 @@ int main() {
|
||||||
dlopen()
|
dlopen()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:4931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:4950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
|
@ -4944,17 +4963,17 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
|
||||||
echo "$ac_t""yes" 1>&6
|
echo "$ac_t""yes" 1>&6
|
||||||
ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
|
ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
|
||||||
echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
|
echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
|
||||||
echo "configure:4948: checking for dlfcn.h" >&5
|
echo "configure:4967: checking for dlfcn.h" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 4953 "configure"
|
#line 4972 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
EOF
|
EOF
|
||||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||||
{ (eval echo configure:4958: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
{ (eval echo configure:4977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||||
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
|
||||||
if test -z "$ac_err"; then
|
if test -z "$ac_err"; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
|
@ -4987,13 +5006,13 @@ esac
|
||||||
|
|
||||||
if test $ac_cv_prog_gcc = yes; then
|
if test $ac_cv_prog_gcc = yes; then
|
||||||
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
|
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
|
||||||
echo "configure:4991: checking whether ${CC-cc} needs -traditional" >&5
|
echo "configure:5010: checking whether ${CC-cc} needs -traditional" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
ac_pattern="Autoconf.*'x'"
|
ac_pattern="Autoconf.*'x'"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 4997 "configure"
|
#line 5016 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <sgtty.h>
|
#include <sgtty.h>
|
||||||
Autoconf TIOCGETP
|
Autoconf TIOCGETP
|
||||||
|
@ -5011,7 +5030,7 @@ rm -f conftest*
|
||||||
|
|
||||||
if test $ac_cv_prog_gcc_traditional = no; then
|
if test $ac_cv_prog_gcc_traditional = no; then
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 5015 "configure"
|
#line 5034 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <termio.h>
|
#include <termio.h>
|
||||||
Autoconf TCGETA
|
Autoconf TCGETA
|
||||||
|
@ -5035,12 +5054,12 @@ fi
|
||||||
for ac_func in lchown strerror
|
for ac_func in lchown strerror
|
||||||
do
|
do
|
||||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||||
echo "configure:5039: checking for $ac_func" >&5
|
echo "configure:5058: checking for $ac_func" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 5044 "configure"
|
#line 5063 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
/* System header to define __stub macros and hopefully few prototypes,
|
/* System header to define __stub macros and hopefully few prototypes,
|
||||||
which can conflict with char $ac_func(); below. */
|
which can conflict with char $ac_func(); below. */
|
||||||
|
@ -5063,7 +5082,7 @@ $ac_func();
|
||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:5067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
if { (eval echo configure:5086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_func_$ac_func=yes"
|
eval "ac_cv_func_$ac_func=yes"
|
||||||
else
|
else
|
||||||
|
@ -5104,7 +5123,7 @@ hpux*)
|
||||||
if test -z "$GNU_CC"; then
|
if test -z "$GNU_CC"; then
|
||||||
|
|
||||||
echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
|
echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
|
||||||
echo "configure:5108: checking for +Olit support" >&5
|
echo "configure:5127: checking for +Olit support" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_hpux_usable_olit_option'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_hpux_usable_olit_option'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
|
@ -5143,7 +5162,7 @@ darwin*)
|
||||||
*)
|
*)
|
||||||
|
|
||||||
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
|
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
|
||||||
echo "configure:5147: checking for pthread_create in -lpthreads" >&5
|
echo "configure:5166: checking for pthread_create in -lpthreads" >&5
|
||||||
echo "
|
echo "
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
void *foo(void *v) { return v; }
|
void *foo(void *v) { return v; }
|
||||||
|
@ -5165,7 +5184,7 @@ echo "
|
||||||
echo "$ac_t""no" 1>&6
|
echo "$ac_t""no" 1>&6
|
||||||
|
|
||||||
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
|
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
|
||||||
echo "configure:5169: checking for pthread_create in -lpthread" >&5
|
echo "configure:5188: checking for pthread_create in -lpthread" >&5
|
||||||
echo "
|
echo "
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
void *foo(void *v) { return v; }
|
void *foo(void *v) { return v; }
|
||||||
|
@ -5187,7 +5206,7 @@ echo "
|
||||||
echo "$ac_t""no" 1>&6
|
echo "$ac_t""no" 1>&6
|
||||||
|
|
||||||
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
|
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
|
||||||
echo "configure:5191: checking for pthread_create in -lc_r" >&5
|
echo "configure:5210: checking for pthread_create in -lc_r" >&5
|
||||||
echo "
|
echo "
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
void *foo(void *v) { return v; }
|
void *foo(void *v) { return v; }
|
||||||
|
@ -5209,7 +5228,7 @@ echo "
|
||||||
echo "$ac_t""no" 1>&6
|
echo "$ac_t""no" 1>&6
|
||||||
|
|
||||||
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
|
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
|
||||||
echo "configure:5213: checking for pthread_create in -lc" >&5
|
echo "configure:5232: checking for pthread_create in -lc" >&5
|
||||||
echo "
|
echo "
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
void *foo(void *v) { return v; }
|
void *foo(void *v) { return v; }
|
||||||
|
@ -5363,7 +5382,7 @@ if test -n "$USE_PTHREADS"; then
|
||||||
rm -f conftest*
|
rm -f conftest*
|
||||||
ac_cv_have_dash_pthread=no
|
ac_cv_have_dash_pthread=no
|
||||||
echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
|
echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
|
||||||
echo "configure:5367: checking whether ${CC-cc} accepts -pthread" >&5
|
echo "configure:5386: checking whether ${CC-cc} accepts -pthread" >&5
|
||||||
echo 'int main() { return 0; }' | cat > conftest.c
|
echo 'int main() { return 0; }' | cat > conftest.c
|
||||||
${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
|
${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
|
||||||
if test $? -eq 0; then
|
if test $? -eq 0; then
|
||||||
|
@ -5386,7 +5405,7 @@ echo "configure:5367: checking whether ${CC-cc} accepts -pthread" >&5
|
||||||
ac_cv_have_dash_pthreads=no
|
ac_cv_have_dash_pthreads=no
|
||||||
if test "$ac_cv_have_dash_pthread" = "no"; then
|
if test "$ac_cv_have_dash_pthread" = "no"; then
|
||||||
echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
|
echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
|
||||||
echo "configure:5390: checking whether ${CC-cc} accepts -pthreads" >&5
|
echo "configure:5409: checking whether ${CC-cc} accepts -pthreads" >&5
|
||||||
echo 'int main() { return 0; }' | cat > conftest.c
|
echo 'int main() { return 0; }' | cat > conftest.c
|
||||||
${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
|
${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
|
||||||
if test $? -eq 0; then
|
if test $? -eq 0; then
|
||||||
|
|
|
@ -44,8 +44,8 @@ dnl ========================================================
|
||||||
dnl = Defaults
|
dnl = Defaults
|
||||||
dnl ========================================================
|
dnl ========================================================
|
||||||
MOD_MAJOR_VERSION=4
|
MOD_MAJOR_VERSION=4
|
||||||
MOD_MINOR_VERSION=6
|
MOD_MINOR_VERSION=7
|
||||||
MOD_PATCH_VERSION=1
|
MOD_PATCH_VERSION=0
|
||||||
NSPR_MODNAME=nspr20
|
NSPR_MODNAME=nspr20
|
||||||
_HAVE_PTHREADS=
|
_HAVE_PTHREADS=
|
||||||
USE_PTHREADS=
|
USE_PTHREADS=
|
||||||
|
@ -1797,6 +1797,13 @@ mips-sony-newsos*)
|
||||||
AC_DEFINE(__svr4__)
|
AC_DEFINE(__svr4__)
|
||||||
AC_DEFINE(SOLARIS)
|
AC_DEFINE(SOLARIS)
|
||||||
AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
|
AC_DEFINE(HAVE_FCNTL_FILE_LOCKING)
|
||||||
|
# Define Solaris feature test macros. (See the standards(5) man page.)
|
||||||
|
# We conform to SUS (XPG4v2).
|
||||||
|
AC_DEFINE(_XOPEN_SOURCE)
|
||||||
|
AC_DEFINE(_XOPEN_SOURCE_EXTENDED)
|
||||||
|
# But we also use interfaces and headers not defined by the standard.
|
||||||
|
AC_DEFINE(__EXTENSIONS__)
|
||||||
|
AC_DEFINE(HAVE_SOCKLEN_T)
|
||||||
MDCPUCFG_H=_solaris.cfg
|
MDCPUCFG_H=_solaris.cfg
|
||||||
PR_MD_CSRCS=solaris.c
|
PR_MD_CSRCS=solaris.c
|
||||||
LD=/usr/ccs/bin/ld
|
LD=/usr/ccs/bin/ld
|
||||||
|
|
Загрузка…
Ссылка в новой задаче