patch for compilers that don't define "unix"
Andrew Cagney
ac131313@cygnus.com
Thu Jan 18 08:34:00 GMT 2001
matthew green wrote:
>
>
> This is not the proper fix though. The rdi-share subdirectory is supposed to
> contain code shared with ARM, so we shouldn't make local modifications in there
> (unless absolutely necessary).
>
> how about this then? tested on netbsd/i386 and solaris 2.6. you'll need to
> regenerate `configure' after applying this patch.
>
> thanks.
>
> 2001-01-15 matthew green <mrg@redhat.com>
>
> * configure.in: Define missing `__unix' if `__unix__' is present.
> * configure: Regenerate.
I think this is wrong (I actually prefered the original patch).
GDB's build process should not be defining symbols that polute the
system name space (anything with a leading double ``__'').
enjoy,
Andrew
> Index: configure.in
> ===================================================================
> RCS file: /cvs/src/src/gdb/configure.in,v
> retrieving revision 1.53
> diff -p -r1.53 configure.in
> *** configure.in 2000/12/21 16:16:17 1.53
> --- configure.in 2001/01/15 18:21:54
> *************** if test x${want_included_regex} = xtrue;
> *** 703,708 ****
> --- 703,718 ----
> AC_DEFINE(USE_INCLUDED_REGEX)
> fi
> AC_SUBST(REGEX)
> +
> + # NetBSD compiler defines __unix__ only; rdi-share needs __unix.
> + AC_CACHE_CHECK([for NetBSD [__unix__]], gdb_cv_missing_netbsd___unix,
> + [AC_EGREP_CPP(lose, [
> + #if defined (__unix__) || !defined (__unix)
> + lose
> + #endif],[gdb_cv_missing_netbsd___unix=yes],[gdb_cv_missing_netbsd___unix=no])])
> + if test x$gdb_cv_missing_netbsd___unix = xyes; then
> + CFLAGS="$CFLAGS -D__unix"
> + fi
>
> # In the Cygwin environment, we need some additional flags.
> AC_CACHE_CHECK([for cygwin], gdb_cv_os_cygwin,
More information about the Gdb-patches
mailing list