This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


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

gthr.h: Use include <> instead of include ""



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


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