diff options
author | Stu Grossman <grossman@cygnus> | 1996-08-13 00:01:37 +0000 |
---|---|---|
committer | Stu Grossman <grossman@cygnus> | 1996-08-13 00:01:37 +0000 |
commit | 8501c7427079ac2d8668e5e36408fa5af2d59bbe (patch) | |
tree | bb991670ad6baa812543c86951fa94bce7e008ed /gdb/configure | |
parent | 817e4f757fcffa848e18e8d49b4aafb9ee101f08 (diff) | |
download | gdb-8501c7427079ac2d8668e5e36408fa5af2d59bbe.zip gdb-8501c7427079ac2d8668e5e36408fa5af2d59bbe.tar.gz gdb-8501c7427079ac2d8668e5e36408fa5af2d59bbe.tar.bz2 |
* defs.h: Define CONST_PTR as blank if compiling with Microsoft
C, else it's `const'.
* c-lang.c c-lang.h ch-lang.c f-lang.c language.c m2-lang.c
scm-lang.c: Microsoft C can't hack const pointers. Use CONST_PTR
macro instead.
* configure configure.in defs.h: Use AC_C_CONST to figure out if
the compiler supports const. Gets rid of some cruft in defs.h.
* dwarf2read.c: <string.h> -> "gdb_string.h"
* remote-sim.c: Add prototypes. Fix call to gdbsim_kill.
* sparcl-tdep.c (download): Add prototypes to write_routine and
start_routine args.
* mswin/gdbwin.c: Don't include both varargs.h AND stdarg.h. Get
rid of varargs.h Include string.h.
* (gdbwin_update gdbwin_fputs regs_changed_f bpt_changed_f
update): Fix prototypes, fix calls.
* (update): Return value for catch_errors.
* (run_execute_command togdb_command_from_tty togdb_command):
Cleanup catching of errors from calls to execute_command. Also,
dup command string to avoid modifying const strings.
* (togdb_breakinfo_i_init togdb_breakinfo_i_next): Use 0 instead
of NULL when see if b->address isn't set.
* (bi_disable_bpt bi_enable_bpt bi_delete_all
bi_delete_breakpoint): Add arg to calls to update.
* (gui_command): Add prototype.
* (mswin_query): Fix prototype.
* (_initialize_gdbwin): Dup string to avoid modifying const.
* (info_path togdb_get_info_path): Remove const from decls cuz
this can't be const (it points at malloc'ed memory).
* (togdb_searchpath): Remove const from path. Dup string to
avoid modifying const strings.
* rindex -> strrchr.
* (gdbwin_list_symbols): Regexp param is const.
* Fix lots of refs to psymtabs to deref correct pointers.
* (togdb_set_breakpoint_sal): Call set_breakpoint_sal with sal,
not &sal.
* mswin/gdbwin.h (togdb_searchpath togdb_get_info_path
toget_set_info_path): Fix prototypes to match reality.
* mswin/gui.cpp: Define _beginthreadex and _endthreadex routines
with proper prototypes.
* mswin/iface.cpp (gdbwin_fputs): Define with correct number of args.
* mswin/ser-win32s.c: Fix defs of min and max.
* mswin/serdll32.c (OpenComm16): Make cbInQueue and cbOutQueue be
USHORT.
* (WriteComm16): Change lpBug from LPVOID to LPCSTR.
* mswin/serdll32.h: Fix prototypes for OpenComm16 and WriteComm16.
Diffstat (limited to 'gdb/configure')
-rwxr-xr-x | gdb/configure | 119 |
1 files changed, 97 insertions, 22 deletions
diff --git a/gdb/configure b/gdb/configure index 200fd70..75f6d46 100755 --- a/gdb/configure +++ b/gdb/configure @@ -1426,6 +1426,81 @@ EOF fi +echo $ac_n "checking for working const""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <<EOF +#line 1435 "configure" +#include "confdefs.h" + +int main() { return 0; } +int t() { + +/* Ultrix mips cc rejects this. */ +typedef int charset[2]; const charset x; +/* SunOS 4.1.1 cc rejects this. */ +char const *const *ccp; +char **p; +/* NEC SVR4.0.2 mips cc rejects this. */ +struct point {int x, y;}; +static struct point const zero = {0,0}; +/* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in an arm + of an if-expression whose if-part is not a constant expression */ +const char *g = "string"; +ccp = &g + (g ? g-g : 0); +/* HPUX 7.0 cc rejects these. */ +++ccp; +p = (char**) ccp; +ccp = (char const *const *) p; +{ /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; +} +{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; +} +{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; +} +{ /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; +} +{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; +} + +; return 0; } +EOF +if { (eval echo configure:1485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_const=yes +else + rm -rf conftest* + ac_cv_c_const=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_c_const" 1>&6 +if test $ac_cv_c_const = no; then + cat >> confdefs.h <<\EOF +#define const +EOF + +fi + + for ac_func in setpgid sbrk do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 @@ -1433,7 +1508,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 <<EOF -#line 1437 "configure" +#line 1512 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -1457,7 +1532,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:1461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1485,7 +1560,7 @@ 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 <<EOF -#line 1489 "configure" +#line 1564 "configure" #include "confdefs.h" #include <sys/procfs.h> int main() { return 0; } @@ -1493,7 +1568,7 @@ int t() { gregset_t *gregsetp = 0 ; return 0; } EOF -if { (eval echo configure:1497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* gdb_cv_have_gregset_t=yes else @@ -1517,7 +1592,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 <<EOF -#line 1521 "configure" +#line 1596 "configure" #include "confdefs.h" #include <sys/procfs.h> int main() { return 0; } @@ -1525,7 +1600,7 @@ int t() { fpregset_t *fpregsetp = 0 ; return 0; } EOF -if { (eval echo configure:1529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* gdb_cv_have_fpregset_t=yes else @@ -1550,7 +1625,7 @@ if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1554 "configure" +#line 1629 "configure" #include "confdefs.h" int main() { return 0; } @@ -1563,7 +1638,7 @@ void bar () } ; return 0; } EOF -if { (eval echo configure:1567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* gdb_cv_c_long_long=yes else @@ -1591,7 +1666,7 @@ else gdb_cv_printf_has_long_long=no else cat > conftest.$ac_ext <<EOF -#line 1595 "configure" +#line 1670 "configure" #include "confdefs.h" int main () { @@ -1601,7 +1676,7 @@ int main () { return (strcmp ("12345", buf)); } EOF -{ (eval echo configure:1605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:1680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then gdb_cv_printf_has_long_long=yes else @@ -1625,7 +1700,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 <<EOF -#line 1629 "configure" +#line 1704 "configure" #include "confdefs.h" int main() { return 0; } @@ -1633,7 +1708,7 @@ int t() { long double foo; ; return 0; } EOF -if { (eval echo configure:1637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_long_double=yes else @@ -1661,7 +1736,7 @@ else gdb_cv_printf_has_long_double=no else cat > conftest.$ac_ext <<EOF -#line 1665 "configure" +#line 1740 "configure" #include "confdefs.h" int main () { @@ -1671,7 +1746,7 @@ int main () { return (strncmp ("3.14159", buf, 7)); } EOF -{ (eval echo configure:1675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:1750: \"$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 @@ -1696,7 +1771,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 <<EOF -#line 1700 "configure" +#line 1775 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -1720,7 +1795,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:1724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1750,7 +1825,7 @@ else ac_cv_func_mmap=no else cat > conftest.$ac_ext <<EOF -#line 1754 "configure" +#line 1829 "configure" #include "confdefs.h" /* Thanks to Mike Haertel and Jim Avera for this test. */ @@ -1819,7 +1894,7 @@ main() } EOF -{ (eval echo configure:1823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } +{ (eval echo configure:1898: \"$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 @@ -2232,12 +2307,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 -#line 2236 "configure" +#line 2311 "configure" #include "confdefs.h" #include <tclInt.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2364,12 +2439,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 -#line 2368 "configure" +#line 2443 "configure" #include "confdefs.h" #include <tk.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2448: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* |