diff options
Diffstat (limited to 'libgloss/libnosys')
-rw-r--r-- | libgloss/libnosys/Makefile.in | 15 | ||||
-rw-r--r-- | libgloss/libnosys/chown.c | 24 | ||||
-rwxr-xr-x | libgloss/libnosys/configure | 62 | ||||
-rw-r--r-- | libgloss/libnosys/configure.in | 22 | ||||
-rw-r--r-- | libgloss/libnosys/readlink.c | 24 | ||||
-rw-r--r-- | libgloss/libnosys/symlink.c | 22 | ||||
-rw-r--r-- | libgloss/libnosys/warning.h | 13 |
7 files changed, 43 insertions, 139 deletions
diff --git a/libgloss/libnosys/Makefile.in b/libgloss/libnosys/Makefile.in index d6634fc54..da48e5318 100644 --- a/libgloss/libnosys/Makefile.in +++ b/libgloss/libnosys/Makefile.in @@ -44,15 +44,15 @@ SHELL = /bin/sh CC = @CC@ #AS = @AS@ -AS = `if [ -f ${objroot}/../gas/as-new ] ; \ - then echo ${objroot}/../gas/as-new ; \ +AS = `if [ -f ${objroot}/../gas/as.new ] ; \ + then echo ${objroot}/../gas/as.new ; \ else echo as ; fi` AR = @AR@ #LD = @LD@ -LD = `if [ -f ${objroot}/../ld/ld-new ] ; \ - then echo ${objroot}/../ld/ld-new ; \ +LD = `if [ -f ${objroot}/../ld/ld.new ] ; \ + then echo ${objroot}/../ld/ld.new ; \ else echo ld ; fi` RANLIB = @RANLIB@ @@ -65,10 +65,9 @@ OBJCOPY = `if [ -f ${objroot}/../binutils/objcopy ] ; \ else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi` # object files needed -OBJS = chown.o close.o environ.o errno.o execve.o fork.o fstat.o \ - getpid.o gettod.o isatty.o kill.o link.o lseek.o open.o \ - read.o readlink.o sbrk.o stat.o symlink.o times.o unlink.o \ - wait.o write.o _exit.o +OBJS = close.o environ.o errno.o execve.o fork.o fstat.o getpid.o gettod.o \ + isatty.o kill.o link.o lseek.o open.o read.o sbrk.o stat.o \ + times.o unlink.o wait.o write.o _exit.o # Object files specific to particular targets. EVALOBJS = ${OBJS} diff --git a/libgloss/libnosys/chown.c b/libgloss/libnosys/chown.c deleted file mode 100644 index 67f98d59d..000000000 --- a/libgloss/libnosys/chown.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Stub version of chown. - */ - -#include "config.h" -#include <_ansi.h> -#include <_syslist.h> -#include <errno.h> -#include <sys/types.h> -#undef errno -extern int errno; -#include "warning.h" - -int -_DEFUN (_chown, (path, owner, group), - const char *path _AND - uid_t owner _AND - gid_t group) -{ - errno = ENOSYS; - return -1; -} - -stub_warning(_chown) diff --git a/libgloss/libnosys/configure b/libgloss/libnosys/configure index a3de0b107..6e8e082bd 100755 --- a/libgloss/libnosys/configure +++ b/libgloss/libnosys/configure @@ -755,8 +755,6 @@ case "${target}" in ;; strongarm-*-*) ;; - cris-*-* | crisv32-*-*) - ;; d10v*) ;; h8300*-*-*) @@ -809,17 +807,15 @@ EOF echo $ac_n "checking for .previous assembler directive""... $ac_c" 1>&6 -echo "configure:813: checking for .previous assembler directive" >&5 +echo "configure:811: checking for .previous assembler directive" >&5 if eval "test \"`echo '$''{'libc_cv_asm_previous_directive'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - libc_cv_asm_previous_directive=no - cat > conftest.s <<EOF + cat > conftest.s <<EOF .section foo_section .previous EOF - if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then - libc_cv_asm_previous_directive=yes + if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then cat >> confdefs.h <<\EOF #define HAVE_ASM_PREVIOUS_DIRECTIVE 1 EOF @@ -831,17 +827,15 @@ fi echo "$ac_t""$libc_cv_asm_previous_directive" 1>&6 echo $ac_n "checking for .popsection assembler directive""... $ac_c" 1>&6 -echo "configure:835: checking for .popsection assembler directive" >&5 +echo "configure:831: checking for .popsection assembler directive" >&5 if eval "test \"`echo '$''{'libc_cv_asm_popsection_directive'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - libc_cv_asm_popsection_directive=no - cat > conftest.s <<EOF + cat > conftest.s <<EOF .pushsection foo_section .popsection EOF - if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then - libc_cv_asm_popsection_directive=yes + if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then cat >> confdefs.h <<\EOF #define HAVE_ASM_POPSECTION_DIRECTIVE 1 EOF @@ -853,17 +847,15 @@ fi echo "$ac_t""$libc_cv_asm_popsection_directive" 1>&6 echo $ac_n "checking for section attributes""... $ac_c" 1>&6 -echo "configure:857: checking for section attributes" >&5 +echo "configure:851: checking for section attributes" >&5 if eval "test \"`echo '$''{'libc_cv_section_attributes'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - libc_cv_section_attributes=no - cat > conftest.c <<EOF + cat > conftest.c <<EOF int secttest __attribute__ ((section (".gnu.warning.secttest"))) = 10; int main() {} EOF - if { ac_try='${CC-cc} -c $CFLAGS conftest.c 1>&5'; { (eval echo configure:866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then - libc_cv_section_attributes=yes + if { ac_try='${CC-cc} -c $CFLAGS conftest.c 1>&5'; { (eval echo configure:859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then cat >> confdefs.h <<\EOF #define HAVE_SECTION_ATTRIBUTES 1 EOF @@ -876,31 +868,27 @@ echo "$ac_t""$libc_cv_section_attributes" 1>&6 ;; esac -echo $ac_n "checking for symbol prefix""... $ac_c" 1>&6 -echo "configure:881: checking for symbol prefix" >&5 -if eval "test \"`echo '$''{'libc_symbol_prefix'+set}'`\" = set"; then +echo $ac_n "checking for function prefix""... $ac_c" 1>&6 +echo "configure:873: checking for function prefix" >&5 +if eval "test \"`echo '$''{'libc_dollar_prefix'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <<\EOF foo () { } EOF -libc_symbol_prefix=none -if { ac_try='${CC-cc} -S conftest.c -o - | fgrep "\$foo" > /dev/null'; { (eval echo configure:889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; +if { ac_try='${CC-cc} -S conftest.c -o - | fgrep "\$foo" > /dev/null'; { (eval echo configure:880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then - libc_symbol_prefix='$' + libc_dollar_prefix=yes else - if { ac_try='${CC-cc} -S conftest.c -o - | fgrep "_foo" > /dev/null'; { (eval echo configure:893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; - then - libc_symbol_prefix=_ - fi + libc_dollar_prefix=no fi rm -f conftest* fi -echo "$ac_t""$libc_symbol_prefix" 1>&6 -if test $libc_symbol_prefix != none; then - cat >> confdefs.h <<EOF -#define __SYMBOL_PREFIX "$libc_symbol_prefix" +echo "$ac_t""$libc_dollar_prefix" 1>&6 +if test $libc_dollar_prefix = yes ; then + cat >> confdefs.h <<\EOF +#define __SYMBOL_PREFIX "$" EOF else @@ -913,7 +901,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:917: checking for $ac_word" >&5 +echo "configure:905: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -943,7 +931,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:947: checking for $ac_word" >&5 +echo "configure:935: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -992,7 +980,7 @@ fi fi echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:996: checking whether we are using GNU C" >&5 +echo "configure:984: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1001,7 +989,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:993: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1016,7 +1004,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1020: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1008: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1052,7 +1040,7 @@ LD=${LD-ld} # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1056: checking for $ac_word" >&5 +echo "configure:1044: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else diff --git a/libgloss/libnosys/configure.in b/libgloss/libnosys/configure.in index b39799fd3..9149e396b 100644 --- a/libgloss/libnosys/configure.in +++ b/libgloss/libnosys/configure.in @@ -89,8 +89,6 @@ case "${target}" in ;; strongarm-*-*) ;; - cris-*-* | crisv32-*-*) - ;; d10v*) ;; h8300*-*-*) @@ -139,63 +137,53 @@ case "${target}" in AC_CACHE_CHECK(for .previous assembler directive, libc_cv_asm_previous_directive, [dnl - libc_cv_asm_previous_directive=no cat > conftest.s <<EOF .section foo_section .previous EOF if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AC_FD_CC); then - libc_cv_asm_previous_directive=yes AC_DEFINE(HAVE_ASM_PREVIOUS_DIRECTIVE) fi rm -f conftest*]) AC_CACHE_CHECK(for .popsection assembler directive, libc_cv_asm_popsection_directive, [dnl - libc_cv_asm_popsection_directive=no cat > conftest.s <<EOF .pushsection foo_section .popsection EOF if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AC_FD_CC); then - libc_cv_asm_popsection_directive=yes AC_DEFINE(HAVE_ASM_POPSECTION_DIRECTIVE) fi rm -f conftest*]) AC_CACHE_CHECK(for section attributes, libc_cv_section_attributes, [dnl - libc_cv_section_attributes=no cat > conftest.c <<EOF int secttest __attribute__ ((section (".gnu.warning.secttest"))) = 10; int main() {} EOF if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.c 1>&AC_FD_CC); then - libc_cv_section_attributes=yes AC_DEFINE(HAVE_SECTION_ATTRIBUTES) fi rm -f conftest*]) ;; esac -AC_CACHE_CHECK(for symbol prefix, libc_symbol_prefix, [dnl +AC_CACHE_CHECK(for function prefix, libc_dollar_prefix, [dnl cat > conftest.c <<\EOF foo () { } EOF dnl -libc_symbol_prefix=none if AC_TRY_COMMAND([${CC-cc} -S conftest.c -o - | fgrep "\$foo" > /dev/null]); then - libc_symbol_prefix='$' + libc_dollar_prefix=yes else - if AC_TRY_COMMAND([${CC-cc} -S conftest.c -o - | fgrep "_foo" > /dev/null]); - then - libc_symbol_prefix=_ - fi + libc_dollar_prefix=no fi rm -f conftest* ]) -if test $libc_symbol_prefix != none; then - AC_DEFINE_UNQUOTED(__SYMBOL_PREFIX, "$libc_symbol_prefix") +if test $libc_dollar_prefix = yes ; then + AC_DEFINE(__SYMBOL_PREFIX, "$") else AC_DEFINE(__SYMBOL_PREFIX, "") fi diff --git a/libgloss/libnosys/readlink.c b/libgloss/libnosys/readlink.c deleted file mode 100644 index 7df253c40..000000000 --- a/libgloss/libnosys/readlink.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Stub version of readlink. - */ - -#include "config.h" -#include <_ansi.h> -#include <_syslist.h> -#include <errno.h> -#include <sys/types.h> -#undef errno -extern int errno; -#include "warning.h" - -int -_DEFUN (_readlink, (path, buf, bufsize), - const char *path _AND - char *buf _AND - size_t bufsize) -{ - errno = ENOSYS; - return -1; -} - -stub_warning(_readlink) diff --git a/libgloss/libnosys/symlink.c b/libgloss/libnosys/symlink.c deleted file mode 100644 index d9e29f2e4..000000000 --- a/libgloss/libnosys/symlink.c +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Stub version of symlink. - */ - -#include "config.h" -#include <_ansi.h> -#include <_syslist.h> -#include <errno.h> -#undef errno -extern int errno; -#include "warning.h" - -int -_DEFUN (_symlink, (path1, path2), - const char *path1 _AND - const char *path2) -{ - errno = ENOSYS; - return -1; -} - -stub_warning(_symlink) diff --git a/libgloss/libnosys/warning.h b/libgloss/libnosys/warning.h index 9232a9244..2c2998250 100644 --- a/libgloss/libnosys/warning.h +++ b/libgloss/libnosys/warning.h @@ -7,19 +7,19 @@ /* We want the .gnu.warning.SYMBOL section to be unallocated. */ # ifdef HAVE_ASM_PREVIOUS_DIRECTIVE # define __make_section_unallocated(section_string) \ - asm(".section " section_string "\n .previous"); + asm(".section " section_string "; .previous"); # elif defined (HAVE_ASM_POPSECTION_DIRECTIVE) # define __make_section_unallocated(section_string) \ - asm(".pushsection " section_string "\n .popsection"); + asm(".pushsection " section_string "; .popsection"); # else # define __make_section_unallocated(section_string) # endif # ifdef HAVE_SECTION_ATTRIBUTES # define link_warning(symbol, msg) \ + __make_section_unallocated (".gnu.warning." #symbol) \ static const char __evoke_link_warning_##symbol[] \ - __attribute__ ((section (".gnu.warning." __SYMBOL_PREFIX #symbol), \ - __used__)) = msg; + __attribute__ ((section (".gnu.warning." #symbol))) = msg; # else # define link_warning(symbol, msg) # endif @@ -35,10 +35,9 @@ # define link_warning(symbol, msg) #endif -/* A canned warning for sysdeps/stub functions. - The GNU linker prepends a "warning: " string. */ +/* A canned warning for sysdeps/stub functions. */ #define stub_warning(name) \ link_warning (name, \ - #name " is not implemented and will always fail") + "warning: " #name " is not implemented and will always fail") #endif /* __WARNING_H__ */ |