From 72ae15f6b0b419e5bb334a232f00f5710e8597ba Mon Sep 17 00:00:00 2001 From: Fred Fish Date: Fri, 5 Apr 1996 04:22:08 +0000 Subject: [PATCH] * configure.in: Check for setpgid function. * config.in: Regenerate with autoheader. * configure: Regenerate with autoconf. * inflow.c (_initialize_inflow): Only try to use _SC_JOB_CONTROL if it is actually defined. (gdb_setpgid): Use HAVE_SETPGID. * ch-exp.c: Change include of to "gdb_string.h". * c-exp.y: Ditto. * f-exp.y: Ditto. * m2-exp.y: Ditto. * c-exp.y: Include . * serial.c: Ditto. * config/m68k/nm-news.h: Add typedef for pid_t which is apparently missing from . Enclose entire file in NM_NEWS_H ifndef and define when included. * config/mips/nm-news-mips.h: Ditto. * config/m68k/tm-m68k.h (REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERT_TO_RAW): Change name of temporary variable. --- gdb/ChangeLog | 21 +++++ gdb/c-exp.y | 3 +- gdb/ch-exp.c | 2 +- gdb/config.in | 3 + gdb/config/m68k/nm-news.h | 10 ++- gdb/config/m68k/tm-m68k.h | 10 +-- gdb/config/mips/nm-news-mips.h | 8 ++ gdb/configure | 136 +++++++++++++++++++++++---------- gdb/configure.in | 2 + gdb/f-exp.y | 2 +- gdb/m2-exp.y | 2 +- gdb/serial.c | 1 + 12 files changed, 147 insertions(+), 53 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3e32bc12264..2c628ac609a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,24 @@ +Thu Apr 4 20:16:55 1996 Fred Fish + + * configure.in: Check for setpgid function. + * config.in: Regenerate with autoheader. + * configure: Regenerate with autoconf. + * inflow.c (_initialize_inflow): Only try to use _SC_JOB_CONTROL + if it is actually defined. + (gdb_setpgid): Use HAVE_SETPGID. + * ch-exp.c: Change include of to "gdb_string.h". + * c-exp.y: Ditto. + * f-exp.y: Ditto. + * m2-exp.y: Ditto. + * c-exp.y: Include . + * serial.c: Ditto. + * config/m68k/nm-news.h: Add typedef for pid_t which is + apparently missing from . Enclose entire + file in NM_NEWS_H ifndef and define when included. + * config/mips/nm-news-mips.h: Ditto. + * config/m68k/tm-m68k.h (REGISTER_CONVERT_TO_VIRTUAL, + REGISTER_CONVERT_TO_RAW): Change name of temporary variable. + Thu Apr 4 19:04:18 1996 Stan Shebs * arm-xdep.c: Move native-specific code to here from arm-tdep.c. diff --git a/gdb/c-exp.y b/gdb/c-exp.y index 3c7c690b3ef..03691ef7094 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -38,7 +38,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ %{ #include "defs.h" -#include +#include "gdb_string.h" +#include #include "expression.h" #include "value.h" #include "parser-defs.h" diff --git a/gdb/ch-exp.c b/gdb/ch-exp.c index ce5f49efdb3..f6f522ab4a6 100644 --- a/gdb/ch-exp.c +++ b/gdb/ch-exp.c @@ -44,7 +44,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ */ #include "defs.h" -#include +#include "gdb_string.h" #include #include "expression.h" #include "language.h" diff --git a/gdb/config.in b/gdb/config.in index 1667bd3d8ff..8443c7cfb19 100644 --- a/gdb/config.in +++ b/gdb/config.in @@ -41,6 +41,9 @@ /* Define if you have the getpagesize function. */ #undef HAVE_GETPAGESIZE +/* Define if you have the setpgid function. */ +#undef HAVE_SETPGID + /* Define if you have the valloc function. */ #undef HAVE_VALLOC diff --git a/gdb/config/m68k/nm-news.h b/gdb/config/m68k/nm-news.h index 00621478dd3..643d217c349 100644 --- a/gdb/config/m68k/nm-news.h +++ b/gdb/config/m68k/nm-news.h @@ -1,5 +1,5 @@ /* Parameters for execution on a Sony/NEWS, for GDB, the GNU debugger. - Copyright 1987, 1989, 1992 Free Software Foundation, Inc. + Copyright 1987, 1989, 1992, 1996 Free Software Foundation, Inc. This file is part of GDB. @@ -17,4 +17,10 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* This file intentionally empty. */ +#ifndef NM_HEWS_H +#define NM_NEWS_H 1 + +/* Supply missing typedef needed in inftarg.c */ +typedef int pid_t; + +#endif /* NM_NEWS_H */ diff --git a/gdb/config/m68k/tm-m68k.h b/gdb/config/m68k/tm-m68k.h index 62ba9b1d6c1..4d284b52f4c 100644 --- a/gdb/config/m68k/tm-m68k.h +++ b/gdb/config/m68k/tm-m68k.h @@ -156,9 +156,9 @@ extern CORE_ADDR m68k_saved_pc_after_call PARAMS ((struct frame_info *)); #define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \ { \ - double val; \ - floatformat_to_double (&floatformat_m68881_ext, (FROM), &val); \ - store_floating ((TO), TYPE_LENGTH (TYPE), val); \ + double dbl_tmp_val; \ + floatformat_to_double (&floatformat_m68881_ext, (FROM), &dbl_tmp_val); \ + store_floating ((TO), TYPE_LENGTH (TYPE), dbl_tmp_val); \ } /* Convert data from virtual format with type TYPE in buffer FROM @@ -166,8 +166,8 @@ extern CORE_ADDR m68k_saved_pc_after_call PARAMS ((struct frame_info *)); #define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \ { \ - double val = extract_floating ((FROM), TYPE_LENGTH (TYPE)); \ - floatformat_from_double (&floatformat_m68881_ext, &val, (TO)); \ + double dbl_tmp_val = extract_floating ((FROM), TYPE_LENGTH (TYPE)); \ + floatformat_from_double (&floatformat_m68881_ext, &dbl_tmp_val, (TO)); \ } /* Return the GDB type object for the "standard" data type diff --git a/gdb/config/mips/nm-news-mips.h b/gdb/config/mips/nm-news-mips.h index af5d7d75522..1ab63ba2b12 100644 --- a/gdb/config/mips/nm-news-mips.h +++ b/gdb/config/mips/nm-news-mips.h @@ -19,6 +19,9 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifndef NM_NEWS_MIPS_H +#define NM_NEWS_MIPS_H 1 + /* Needed for RISC NEWS core files. */ #include #include @@ -32,3 +35,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define ONE_PROCESS_WRITETEXT #include "mips/nm-mips.h" + +/* Apparently not in */ +typedef int pid_t; + +#endif /* NM_NEWS_MIPS_H */ diff --git a/gdb/configure b/gdb/configure index 6ef555f09c1..2f4bb753870 100755 --- a/gdb/configure +++ b/gdb/configure @@ -1282,12 +1282,64 @@ EOF fi +for ac_func in setpgid +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +char $ac_func(); + +int main() { return 0; } +int t() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* + +fi +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + + echo $ac_n "checking for gregset_t type""... $ac_c" 1>&6 if eval "test \"`echo '$''{'gdb_cv_have_gregset_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return 0; } @@ -1295,7 +1347,7 @@ int t() { gregset_t *gregsetp = 0 ; return 0; } EOF -if { (eval echo configure:1299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* gdb_cv_have_gregset_t=yes else @@ -1319,7 +1371,7 @@ if eval "test \"`echo '$''{'gdb_cv_have_fpregset_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { return 0; } @@ -1327,7 +1379,7 @@ int t() { fpregset_t *fpregsetp = 0 ; return 0; } EOF -if { (eval echo configure:1331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* gdb_cv_have_fpregset_t=yes else @@ -1352,7 +1404,7 @@ if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_long_double=yes else @@ -1388,7 +1440,7 @@ else gdb_cv_printf_has_long_double=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:1454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then gdb_cv_printf_has_long_double=yes else @@ -1423,7 +1475,7 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1475,7 +1527,7 @@ else ac_cv_func_mmap=no else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:1600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then ac_cv_func_mmap=yes else @@ -1712,12 +1764,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1721: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1784,7 +1836,7 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -1913,7 +1965,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lICE $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1957,7 +2009,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1992,7 +2044,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2032,7 +2084,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2071,7 +2123,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2176,12 +2228,12 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2234,7 +2286,7 @@ if test "$cross_compiling" = yes; then else cat > conftest.$ac_ext < @@ -2249,7 +2301,7 @@ main() { return 0; } EOF -{ (eval echo configure:2253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:2305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then tclmajor=`cat tclmajor` tclminor=`cat tclminor` @@ -2394,13 +2446,13 @@ else ac_cv_c_tclib="-l$installedtcllibroot" else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:2456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then ac_cv_c_tcllib="-l$installedtcllibroot" else @@ -2510,12 +2562,12 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2575,7 +2627,7 @@ if test "$cross_compiling" = yes; then else cat > conftest.$ac_ext < @@ -2590,7 +2642,7 @@ cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:2646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then tkmajor=`cat tkmajor` tkminor=`cat tkminor` @@ -2756,13 +2808,13 @@ else ac_cv_c_tklib="-l$installedtklibroot" else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:2818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then ac_cv_c_tklib="-l$installedtklibroot" else @@ -2803,7 +2855,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2841,7 +2893,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldld $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else diff --git a/gdb/configure.in b/gdb/configure.in index a4c50f1e0e5..ddfca601335 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -40,6 +40,8 @@ AC_HEADER_STDC AC_CHECK_HEADERS(limits.h memory.h string.h strings.h unistd.h termios.h termio.h sgtty.h stddef.h sys/procfs.h link.h) AC_HEADER_STAT +AC_CHECK_FUNCS(setpgid) + AC_MSG_CHECKING([for gregset_t type]) AC_CACHE_VAL(gdb_cv_have_gregset_t, [AC_TRY_LINK([#include ],[gregset_t *gregsetp = 0], diff --git a/gdb/f-exp.y b/gdb/f-exp.y index b50094aa98c..528d2154677 100644 --- a/gdb/f-exp.y +++ b/gdb/f-exp.y @@ -43,7 +43,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ %{ #include "defs.h" -#include +#include "gdb_string.h" #include "expression.h" #include "value.h" #include "parser-defs.h" diff --git a/gdb/m2-exp.y b/gdb/m2-exp.y index f207b244304..08a11ce2c3c 100644 --- a/gdb/m2-exp.y +++ b/gdb/m2-exp.y @@ -40,7 +40,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ %{ #include "defs.h" -#include +#include "gdb_string.h" #include "expression.h" #include "language.h" #include "value.h" diff --git a/gdb/serial.c b/gdb/serial.c index 6902648a19c..18c6cde8666 100644 --- a/gdb/serial.c +++ b/gdb/serial.c @@ -18,6 +18,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "defs.h" +#include #include "serial.h" #include "gdb_string.h" #include "gdbcmd.h" -- 2.30.2