Wrong test for glibc

Andreas Jaeger aj@suse.de
Sun Jan 14 08:31:00 GMT 2001


On a glibc 2.0 based system I got:
../../../../gcc/libstdc++-v3/libio/libio.h:165:31: bits/stdio-lock.h: No such file or directory

<bits/stdio-lock.h> was moved in glibc 2.1 from <stdio-lock.h> - the
test should therefore be fixed.

May I commit the appended patch?  I tested it on a glibc 2.0
(mipsel-linux) and with a full bootstrap on a 2.2 system (i686-linux).

Andreas

2001-01-14  Andreas Jaeger  <aj@suse.de>

	* libio/libio.h: Add test for glibc 2.0.

============================================================
Index: libstdc++-v3/libio/libio.h
--- libstdc++-v3/libio/libio.h	2000/11/23 11:30:45	1.12
+++ libstdc++-v3/libio/libio.h	2001/01/14 14:02:00
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,93,94,95,97,98,99,2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,93,94,95,97,98,99,2000,2001 Free Software Foundation, Inc.
    This file is part of the GNU IO Library.
    Written by Per Bothner <bothner@cygnus.com>.
 
@@ -162,7 +162,11 @@
 /* Handle lock.  */
 #ifdef _IO_MTSAFE_IO
 # if defined __GLIBC__ && __GLIBC__ >= 2
-#  include <bits/stdio-lock.h>
+#  if __GLIBC_MINOR__ == 0
+#   include <stdio-lock.h>
+#  else
+#   include <bits/stdio-lock.h>
+#  endif
 # else
 /*# include <comthread.h>*/
 # endif


-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj


More information about the Libstdc++ mailing list