This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: gthr.h: Use include <> instead of include ""
- To: Andreas Jaeger <aj at suse dot de>
- Subject: Re: gthr.h: Use include <> instead of include ""
- From: Carlo Wood <carlo at alinoe dot com>
- Date: Tue, 10 Jul 2001 01:03:44 +0200
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>, Michael Andres <ma at suse dot de>
- References: <hok81i2oqq.fsf@gee.suse.de>
Now this is weird, I remember to already have SEEN a patch for this, one
that did fix it correctly... However, it might be that that fix only
added 'bits/' to the include path.
Nevertheless, the point is that the _installed_ gthr.h is passed through sed
first. Using the same sed that adds the bits/ part can be used to change the
double quote into a < .. > (if it didn't do that already).
On Mon, Jul 09, 2001 at 03:53:01PM +0200, Andreas Jaeger wrote:
> gthr.h uses #include "...". IMO system include files should only
> search in system paths and we should therefore use #include <...> to
> avoid including user level files.
>
> Unfortunatly the appended patch does not work, bootstrapping of GCC
> fails for me with this:
>
> /builds/gcc/gcc-3.1-devel/gcc/xgcc -B/builds/gcc/gcc-3.1-devel/gcc/ -nostdinc++ -L/builds/gcc/gcc-3.1-devel/i686-pc-linux-gnu/libstdc++-v3/src -L/builds/gcc/gcc-3.1-devel/i686-pc-linux-gnu/libstdc++-v3/src/.libs -B/opt/gcc-3.1-devel/i686-pc-linux-gnu/bin/ -B/opt/gcc-3.1-devel/i686-pc-linux-gnu/lib/ -isystem /opt/gcc-3.1-devel/i686-pc-linux-gnu/include -I/cvs/gcc/libstdc++-v3/../gcc -I/cvs/gcc/libstdc++-v3/../include -I/cvs/gcc/libstdc++-v3/include -I/cvs/gcc/libstdc++-v3/include/std -I/cvs/gcc/libstdc++-v3/include/c_std -I../include -I/cvs/gcc/libstdc++-v3/libsupc++ -g -O2 -D_GNU_SOURCE -fno-implicit-templates -Wall -Wno-format -W -Wwrite-strings -Winline -fdiagnostics-show-location=once -g -c /cvs/gcc/libstdc++-v3/libsupc++/eh_alloc.cc -fPIC -DPIC
> cc1plus: warning: changing search order for system directory "/opt/gcc-3.1-devel/i686-pc-linux-gnu/include"
> cc1plus: warning: as it has already been specified as a system directory
> In file included from /cvs/gcc/libstdc++-v3/libsupc++/eh_alloc.cc:39:
> ../include/bits/gthr.h:98:26: gthr-default.h: No such file or directory
> make[4]: *** [eh_alloc.lo] Error 1
>
>
> So, is there an easy way to fix this - or should we regard this as a
> cosmetical problems? I don't know directly how to fix the makefiles
> to get this working. Should I file it in GNATS?
>
> Andreas
>
> 2001-07-09 Andreas Jaeger <aj@suse.de>
>
> * gthr.h: Use system include path.
>
> ============================================================
> Index: gcc/gthr.h
> --- gcc/gthr.h 2001/05/26 01:31:34 1.8
> +++ gcc/gthr.h 2001/07/09 12:33:15
> @@ -1,6 +1,6 @@
> /* Threads compatibility routines for libgcc2. */
> /* Compile this one with gcc. */
> -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
> +/* Copyright (C) 1997, 1998, 2001 Free Software Foundation, Inc.
>
> This file is part of GNU CC.
>
> @@ -82,11 +82,11 @@
>
> /* Check first for thread specific defines. */
> #if _PTHREADS
> -#include "gthr-posix.h"
> +#include <gthr-posix.h>
> #elif _DCE_THREADS
> -#include "gthr-dce.h"
> +#include <gthr-dce.h>
> #elif _SOLARIS_THREADS
> -#include "gthr-solaris.h"
> +#include <gthr-solaris.h>
>
> /* Include GTHREAD_FILE if one is defined. */
> #elif defined(HAVE_GTHR_DEFAULT)
> @@ -95,11 +95,11 @@
> #define GTHREAD_USE_WEAK 1
> #endif
> #endif
> -#include "gthr-default.h"
> +#include <gthr-default.h>
>
> /* Fallback to single thread definitions. */
> #else
> -#include "gthr-single.h"
> +#include <gthr-single.h>
> #endif
>
> #endif /* ! GCC_GTHR_H */
>
> --
> Andreas Jaeger
> SuSE Labs aj@suse.de
> private aj@arthur.inka.de
> http://www.suse.de/~aj
This looks like 3.0, after 3.0 was released AT LEAST a bits/ part was added
(ie: #include "bits/gthr-default.h"), using the aforementioned sed. But
again, it might even already changed the "" too.
--
Carlo Wood <carlo@alinoe.com>