1 # This file is generated from configure.in by Autoconf. DO NOT EDIT!
2 # Local configure fragment for sysdeps/unix/sysv/linux/mips.
7 asm_unistd_h=$sysheaders/asm/unistd.h
8 if test ! -f $asm_unistd_h; then
9 # Try to find asm/unistd.h in compiler header search path.
10 try_asm_unistd_h=`echo '#include <asm/unistd.h>' | $CPP - |
11 sed -n '/^# 1 "\(\/[^"]*\)".*/{s,,\1,p;q;}'`
12 if test -n "$try_asm_unistd_h" &&
13 test -f "$try_asm_unistd_h"; then
14 asm_unistd_h=$try_asm_unistd_h
17 if test ! -f "$asm_unistd_h"; then
18 { echo "$as_me:$LINENO: WARNING: *** asm/unistd.h not found, it will not be pre-processed" >&5
19 echo "$as_me: WARNING: *** asm/unistd.h not found, it will not be pre-processed" >&2;}
20 echo '#include <asm/unistd.h>' > asm-unistd.h
21 elif grep __NR_N32_open "$asm_unistd_h" > /dev/null; then
22 # The point of this preprocessing is to turn __NR_<syscall> into
23 # __NR_N64_<syscall>, as well as to define __NR_<syscall> to
24 # __NR_<abi>_<syscall>, if __NR_<abi>_<syscall> is defined
25 # and <abi> is the compiler-enabled ABI.
27 sed -e 's,__NR_,__NR_N64_,g' \
28 -e 's,__NR_N64_##,__NR_##,g' \
29 -e 's,__NR_N64_O32_,__NR_O32_,g' \
30 -e 's,__NR_N64_N32_,__NR_N32_,g' \
31 -e 's,__NR_N64_N64_,__NR_N64_,g' \
32 | awk > asm-unistd.h '
33 BEGIN { print "#include <sgidefs.h>"; }
34 /^#define __NR.*unused/ { print; next; }
35 /^#define __NR_N64__exit __NR_N64_exit/ {
36 print "#define __NR__exit __NR_exit";
37 print "#define __NR_O32__exit __NR_O32_exit";
38 print "#define __NR_N32__exit __NR_N32_exit";
41 /^#define __NR_O32_/ {
43 sub (/_O32_/, "_", name);
45 print "#if _MIPS_SIM == _ABIO32";
46 print "# define " name " " $2;
50 /^#define __NR_N32_/ {
52 sub (/_N32_/, "_", name);
54 print "#if _MIPS_SIM == _ABIN32";
55 print "# define " name " " $2;
59 /^#define __NR_N64_/ {
61 sub (/_N64_/, "_", name);
63 print "#if _MIPS_SIM == _ABI64";
64 print "# define " name " " $2;
72 echo '#include <asm/unistd.h>' > asm-unistd.h
76 echo '#include <asm/unistd.h>' > asm-unistd.h