From: Roland McGrath Date: Thu, 9 May 1996 16:50:03 +0000 (+0000) Subject: * sysdeps/unix/sysv/linux/net/if.h: New file. X-Git-Tag: cvs/libc-960510~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8942a07afcba648c1766c8e94df65b92a555fdb3;p=platform%2Fupstream%2Fglibc.git * sysdeps/unix/sysv/linux/net/if.h: New file. * sysdeps/unix/sysv/linux/Dist: Add it. * sysdeps/unix/sysv/linux/Makefile [$(subdir)=socket] (headers): Add net/if.h. * Makeconfig (link-libc): Add libc.a after libc.so in link. * Rules (static-only-routines rule): Use empty.o instead of dummy.o. (empty.o): New target. (generated): Add empty.c, empty.o. --- diff --git a/ChangeLog b/ChangeLog index c4233e2..c6c0776 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ Thu May 9 09:17:46 1996 Roland McGrath + * sysdeps/unix/sysv/linux/net/if.h: New file. + * sysdeps/unix/sysv/linux/Dist: Add it. + * sysdeps/unix/sysv/linux/Makefile [$(subdir)=socket] (headers): Add + net/if.h. + + * Makeconfig (link-libc): Add libc.a after libc.so in link. + + * Rules (static-only-routines rule): Use empty.o instead of dummy.o. + (empty.o): New target. + (generated): Add empty.c, empty.o. + * resolv: Code updated from BIND-4.9.3P2C3. * Rules (static-only-routines rule): Use dummy.o, not dummy.so. diff --git a/Makeconfig b/Makeconfig index b9de4f3..ba0c940 100644 --- a/Makeconfig +++ b/Makeconfig @@ -292,7 +292,7 @@ endif ifndef link-libc ifeq (yes,$(build-shared)) link-libc = -Wl,-rpath-link=$(common-objdir) \ - $(common-objpfx)libc.so$(libc.so-version) $(gnulib) + $(common-objpfx)libc.so $(common-objpfx)libc.a $(gnulib) # Choose the default search path for the dynamic linker based on # where we will install libraries. ifneq ($(libdir),$(slibdir)) diff --git a/Rules b/Rules index f0ae048..39c805bf 100644 --- a/Rules +++ b/Rules @@ -70,7 +70,11 @@ $(objpfx)dummy.o: @rm -f $(@:.o=.c) echo 'void __dummy__ () { }' > $(@:.o=.c) $(CC) -c $(@:.o=.c) -o $@ -generated := $(generated) dummy.o dummy.c +$(objpfx)empty.o: + @rm -f $(@:.o=.c) + echo '' > $(@:.o=.c) + $(CC) -c $(@:.o=.c) -o $@ +generated := $(generated) dummy.o dummy.c empty.c empty.o # This makes all the auxilliary and test programs. @@ -144,8 +148,8 @@ $(common-objpfx)sor-$(subdir): Makefile ifdef static-only-routines # These routines are to be omitted from the shared library object, -# so we replace the PIC objects for them with the dummy object file. -$(static-only-routines:%=$(objpfx)%.so): %.so: $(common-objpfx) dummy.o +# so we replace the PIC objects for them with the empty object file. +$(static-only-routines:%=$(objpfx)%.so): %.so: $(common-objpfx) empty.o rm -f $@ ln $< $@ endif diff --git a/configure b/configure index b00ab8a..18550ab 100755 --- a/configure +++ b/configure @@ -1089,6 +1089,62 @@ fi +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&4 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&4 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1114: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +echo "$ac_t""$CPP" 1>&4 + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&4 @@ -1182,61 +1238,97 @@ else fi fi -echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&4 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= +# Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&4 +if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&4 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="objdump" fi -if test -z "$CPP"; then -if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then +fi +OBJDUMP="$ac_cv_prog_OBJDUMP" +if test -n "$OBJDUMP"; then + echo "$ac_t""$OBJDUMP" 1>&4 +else + echo "$ac_t""no" 1>&4 +fi + + + +# Extract the first word of "${ac_tool_prefix}objcopy", so it can be a program name with args. +set dummy ${ac_tool_prefix}objcopy; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&4 +if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&4 else - # This must be in double quotes, not single quotes, because CPP may get - # substituted into the Makefile and "${CC-cc}" will confuse make. - CPP="${CC-cc} -E" - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - : + if test -n "$OBJCOPY"; then + ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test. else - echo "$ac_err" >&5 - rm -rf conftest* - CPP="${CC-cc} -E -traditional-cpp" - cat > conftest.$ac_ext < -Syntax Error -EOF -ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` -if test -z "$ac_err"; then - : + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_OBJCOPY="${ac_tool_prefix}objcopy" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_OBJCOPY" && ac_cv_prog_OBJCOPY="objcopy" +fi +fi +OBJCOPY="$ac_cv_prog_OBJCOPY" +if test -n "$OBJCOPY"; then + echo "$ac_t""$OBJCOPY" 1>&4 else - echo "$ac_err" >&5 - rm -rf conftest* - CPP=/lib/cpp + echo "$ac_t""no" 1>&4 fi -rm -f conftest* + + + +for ac_prog in mawk gawk nawk awk +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&4 +if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&4 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_AWK="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" fi -rm -f conftest* - ac_cv_prog_CPP="$CPP" fi - CPP="$ac_cv_prog_CPP" +AWK="$ac_cv_prog_AWK" +if test -n "$AWK"; then + echo "$ac_t""$AWK" 1>&4 else - ac_cv_prog_CPP="$CPP" + echo "$ac_t""no" 1>&4 fi -echo "$ac_t""$CPP" 1>&4 + +test -n "$AWK" && break +done echo $ac_n "checking for signed size_t type""... $ac_c" 1>&4 @@ -1267,7 +1359,7 @@ if eval "test \"`echo '$''{'libc_cv_friendly_stddef'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&4 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* libc_cv_friendly_stddef=yes else @@ -1390,7 +1482,7 @@ if eval "test \"`echo '$''{'libc_cv_have_initfini'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&4 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* libc_cv_have_initfini=yes else @@ -1427,7 +1519,7 @@ if eval "test \"`echo '$''{'libc_cv_asm_underscores'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&4 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* libc_cv_asm_underscores=yes else @@ -1795,9 +1887,12 @@ s%@build_cpu@%$build_cpu%g s%@build_vendor@%$build_vendor%g s%@build_os@%$build_os%g s%@CC@%$CC%g +s%@CPP@%$CPP%g s%@AR@%$AR%g s%@RANLIB@%$RANLIB%g -s%@CPP@%$CPP%g +s%@OBJDUMP@%$OBJDUMP%g +s%@OBJCOPY@%$OBJCOPY%g +s%@AWK@%$AWK%g s%@libc_cv_have_initfini@%$libc_cv_have_initfini%g s%@libc_cv_ld_no_whole_archive@%$libc_cv_ld_no_whole_archive%g s%@uname_sysname@%$uname_sysname%g diff --git a/sysdeps/unix/sysv/linux/Dist b/sysdeps/unix/sysv/linux/Dist index b741cdc..526e129 100644 --- a/sysdeps/unix/sysv/linux/Dist +++ b/sysdeps/unix/sysv/linux/Dist @@ -1,3 +1,4 @@ +net/if.h sys/acct.h sys/quota.h sys/socketcall.h diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index 53837ab..c3bdd1b 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -26,7 +26,7 @@ headers += sys/timex.h endif ifeq ($(subdir), socket) -headers += sys/socketcall.h +headers += sys/socketcall.h net/if.h endif ifeq ($(subdir), sunrpc) diff --git a/sysdeps/unix/sysv/linux/net/if.h b/sysdeps/unix/sysv/linux/net/if.h new file mode 100644 index 0000000..1aa8e7b --- /dev/null +++ b/sysdeps/unix/sysv/linux/net/if.h @@ -0,0 +1 @@ +#include