This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: patch for compilers that don't define "unix"


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.
> 

Thank you Matthew.

I will give it a spin and commit it in a couple of days if nobody
disagrees.

Regards,
Fernando


> thanks.
> 
> 2001-01-15  matthew green  <mrg@redhat.com>
> 
>         * configure.in: Define missing `__unix' if `__unix__' is present.
>         * configure: Regenerate.
> 
> 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,

-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]