public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [v3] system_error
@ 2007-08-23 16:20 Benjamin Kosnik
  2007-08-23 19:43 ` Hans-Peter Nilsson
  2007-08-24  9:16 ` Krister Walfridsson
  0 siblings, 2 replies; 12+ messages in thread
From: Benjamin Kosnik @ 2007-08-23 16:20 UTC (permalink / raw)
  To: libstdc++, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 509 bytes --]


This adds in support for the <system_error> include, which was first
posted here:

http://gcc.gnu.org/ml/libstdc++/2007-05/msg00082.html

The formal specification is still pretty up in the air, but this
seems to be a decent starting point. Post-toronto, all messaging bits
were removed: there have been some suggestions on how to do this (best
from Peter Dimov, IMHO) but nothing concrete. This part can be added at
a later date, when the dust settles.

tested x86/linux
tested x86/linux x arm-elf

-benjamin

[-- Attachment #2: p.20070823-1.bz2 --]
[-- Type: application/x-bzip, Size: 10073 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [v3] system_error
  2007-08-23 16:20 [v3] system_error Benjamin Kosnik
@ 2007-08-23 19:43 ` Hans-Peter Nilsson
  2007-08-23 20:36   ` Hans-Peter Nilsson
  2007-08-24  9:16 ` Krister Walfridsson
  1 sibling, 1 reply; 12+ messages in thread
From: Hans-Peter Nilsson @ 2007-08-23 19:43 UTC (permalink / raw)
  To: benjamin.kosnik; +Cc: libstdc++, gcc-patches

> Date: Thu, 23 Aug 2007 11:13:02 -0500
> From: Benjamin Kosnik <benjamin.kosnik@gmail.com>

> This adds in support for the <system_error> include, which was first
> posted here:
> 
> http://gcc.gnu.org/ml/libstdc++/2007-05/msg00082.html
> 
> The formal specification is still pretty up in the air, but this
> seems to be a decent starting point. Post-toronto, all messaging bits
> were removed: there have been some suggestions on how to do this (best
> from Peter Dimov, IMHO) but nothing concrete. This part can be added at
> a later date, when the dust settles.
> 
> tested x86/linux
> tested x86/linux x arm-elf

This patch broke cris-axis-elf:

libtool: compile:  /tmp/hpautotest-gcc1/cris-elf/gccobj/./gcc/xgcc -shared-libgcc -B/tmp/hpautotest-gcc1/cris-elf/gccobj/./gcc -nostdinc++ -L/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/libstdc++-v3/src -L/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/libstdc++-v3/src/.libs -nostdinc -B/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/newlib/ -isystem /tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/newlib/targ-include -isystem /tmp/hpautotest-gcc1/gcc/newlib/libc/include -B/tmp/hpautotest-gcc1/cris-elf/pre/cris-elf/bin/ -B/tmp/hpautotest-gcc1/cris-elf/pre/cris-elf/lib/ -isystem /tmp/hpautotest-gcc1/cris-elf/pre/cris-elf/include -isystem /tmp/hpautotest-gcc1/cris-elf/pre/cris-elf/sys-include -I/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/libstdc++-v3/include/cris-elf -I/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/libstdc++-v3/include -I/tmp/hpautotest-gcc1/gcc/libstdc++-v3/libsupc++ -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -fdiagnostics-show-location=once!
  -ffunction-sections -fdata-sections -g -O2 -std=gnu++0x -c /tmp/hpautotest-gcc1/gcc/libstdc++-v3/src/system_error.cc -o system_error.o
In file included from /tmp/hpautotest-gcc1/gcc/libstdc++-v3/src/system_error.cc:32:
/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/libstdc++-v3/include/system_error:112: error: 'ENOTSUP' was not declared in this scope
/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/libstdc++-v3/include/system_error:113: error: 'ECANCELED' was not declared in this scope
make[4]: *** [system_error.lo] Error 1

brgds, H-P

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [v3] system_error
  2007-08-23 19:43 ` Hans-Peter Nilsson
@ 2007-08-23 20:36   ` Hans-Peter Nilsson
  0 siblings, 0 replies; 12+ messages in thread
From: Hans-Peter Nilsson @ 2007-08-23 20:36 UTC (permalink / raw)
  To: benjamin.kosnik; +Cc: libstdc++, gcc-patches

> Date: Thu, 23 Aug 2007 21:30:23 +0200
> From: Hans-Peter Nilsson <hp@axis.com>

> /tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/libstdc++-v3/include/system_error:112: error: 'ENOTSUP' was not declared in this scope
> /tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/libstdc++-v3/include/system_error:113: error: 'ECANCELED' was not declared in this scope

Hm, I see they're POSIX.1 error codes and that CRIS isn't using
the newlib errno.h but one adjusted to use the same numbers as
Linux error codes.  So, I'd do best in fixing that errno.h
myself...  Sorry for the noise.

brgds, H-P

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [v3] system_error
  2007-08-23 16:20 [v3] system_error Benjamin Kosnik
  2007-08-23 19:43 ` Hans-Peter Nilsson
@ 2007-08-24  9:16 ` Krister Walfridsson
  2007-08-24 15:45   ` Benjamin Kosnik
  1 sibling, 1 reply; 12+ messages in thread
From: Krister Walfridsson @ 2007-08-24  9:16 UTC (permalink / raw)
  To: Benjamin Kosnik; +Cc: libstdc++, gcc-patches


On Thu, 23 Aug 2007, Benjamin Kosnik wrote:

> This adds in support for the <system_error> include, which was first
> posted here:
>
> http://gcc.gnu.org/ml/libstdc++/2007-05/msg00082.html
>
> The formal specification is still pretty up in the air, but this
> seems to be a decent starting point. Post-toronto, all messaging bits
> were removed: there have been some suggestions on how to do this (best
> from Peter Dimov, IMHO) but nothing concrete. This part can be added at
> a later date, when the dust settles.
>
> tested x86/linux
> tested x86/linux x arm-elf

This patch broke i386-unknown-netbsdelf3.1:

libtool: compile:  /gcctmp/gcc070823/build/./gcc/xgcc -shared-libgcc -B/gcctmp/gcc070823/build/./gcc -nostdinc++ -L/gcctmp/gcc070823/build/i386-unknown-netbsdelf3.1/libstdc++-v3/src -L/gcctmp/gcc070823/build/i386-unknown-netbsdelf3.1/libstdc++-v3/src/.libs -B/usr/local/i386-unknown-netbsdelf3.1/bin/ -B/usr/local/i386-unknown-netbsdelf3.1/lib/ -isystem /usr/local/i386-unknown-netbsdelf3.1/include -isystem /usr/local/i386-unknown-netbsdelf3.1/sys-include -I/gcctmp/gcc070823/build/i386-unknown-netbsdelf3.1/libstdc++-v3/include/i386-unknown-netbsdelf3.1 -I/gcctmp/gcc070823/build/i386-unknown-netbsdelf3.1/libstdc++-v3/include -I/gcctmp/gcc070823/gcc/libstdc++-v3/libsupc++ -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -g -O2 -std=gnu++0x -c ../../../../gcc/libstdc++-v3/src/system_error.cc  -fPIC -DPIC -o .libs/system_error.o
In file included from ../../../../gcc/libstdc++-v3/src/system_error.cc:32:
/gcctmp/gcc070823/build/i386-unknown-netbsdelf3.1/libstdc++-v3/include/system_error:96: error: 'ENOLINK' was not declared in this scope
/gcctmp/gcc070823/build/i386-unknown-netbsdelf3.1/libstdc++-v3/include/system_error:122: error: 'EPROTO' was not declared in this scope
gmake[4]: *** [system_error.lo] Error 1

    /Krister

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [v3] system_error
  2007-08-24  9:16 ` Krister Walfridsson
@ 2007-08-24 15:45   ` Benjamin Kosnik
  2007-08-25 15:26     ` Gerald Pfeifer
  0 siblings, 1 reply; 12+ messages in thread
From: Benjamin Kosnik @ 2007-08-24 15:45 UTC (permalink / raw)
  To: Krister Walfridsson; +Cc: libstdc++, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 66 bytes --]


Here. This fixes the netbsd issue.

-benjamin

tested x86/linux


[-- Attachment #2: p.20070824-1 --]
[-- Type: application/octet-stream, Size: 4301 bytes --]

2007-08-24  Benjamin Kosnik  <bkoz@redhat.com>

	* acinclude.m4 (GLIBCXX_CHECK_SYSTEM_ERROR): Add ENOLINK, EPROTO
	for netbsd.
	* configure: Regenerate.
	* include/std/system_error: Guard.	
	* testsuite/19_diagnostics/headers/system_error/
	types_std_c++0x.cc: Same.
	* testsuite/19_diagnostics/error_category/cons/copy_neg.cc: Adjust
	line numbers.


Index: include/std/system_error
===================================================================
--- include/std/system_error	(revision 127771)
+++ include/std/system_error	(working copy)
@@ -93,7 +93,9 @@
       network_unreachable = 			ENETUNREACH,
       no_buffer_space = 			ENOBUFS,
       no_child_process = 			ECHILD,
+#ifdef _GLIBCXX_HAVE_ENOLINK
       no_link = 				ENOLINK,
+#endif
       no_lock_available = 			ENOLCK,
       no_message_available = 			ENODATA, 
       no_message = 				ENOMSG, 
@@ -119,7 +121,9 @@
       owner_dead = 				EOWNERDEAD,
 #endif
       permission_denied = 			EACCES,
+#ifdef _GLIBCXX_HAVE_EPROTO
       protocol_error = 				EPROTO,
+#endif
       protocol_not_supported = 			EPROTONOSUPPORT,
       read_only_file_system = 			EROFS,
       resource_deadlock_would_occur = 		EDEADLK,
Index: testsuite/19_diagnostics/error_category/cons/copy_neg.cc
===================================================================
--- testsuite/19_diagnostics/error_category/cons/copy_neg.cc	(revision 127771)
+++ testsuite/19_diagnostics/error_category/cons/copy_neg.cc	(working copy)
@@ -50,7 +50,7 @@
   return 0;
 }
 
-// { dg-error "is private" "" { target *-*-* } 162 }
+// { dg-error "is private" "" { target *-*-* } 166 }
 // { dg-error "within this context" "" { target *-*-* } 29 }
 // { dg-error "first required here" "" { target *-*-* } 48 }
 // { dg-excess-errors "copy constructor" }
Index: testsuite/19_diagnostics/headers/system_error/types_std_c++0x.cc
===================================================================
--- testsuite/19_diagnostics/headers/system_error/types_std_c++0x.cc	(revision 127771)
+++ testsuite/19_diagnostics/headers/system_error/types_std_c++0x.cc	(working copy)
@@ -67,7 +67,11 @@
   using std::network_unreachable; 
   using std::no_buffer_space; 
   using std::no_child_process;
+
+#ifdef _GLIBCXX_HAVE_ENOLINK
   using std::no_link; 
+#endif
+
   using std::no_lock_available; 
   using std::no_message_available; 
   using std::no_message; 
@@ -96,7 +100,11 @@
 #endif
 
   using std::permission_denied;
+
+#ifdef _GLIBCXX_HAVE_EPROTO
   using std::protocol_error; 
+#endif
+
   using std::protocol_not_supported;
   using std::read_only_file_system; 
   using std::resource_deadlock_would_occur;
Index: config.h.in
===================================================================
--- config.h.in	(revision 127771)
+++ config.h.in	(working copy)
@@ -63,12 +63,18 @@
 /* Define to 1 if you have the <endian.h> header file. */
 #undef HAVE_ENDIAN_H
 
+/* Define if ENOLINK exists. */
+#undef HAVE_ENOLINK
+
 /* Define if ENOTRECOVERABLE exists. */
 #undef HAVE_ENOTRECOVERABLE
 
 /* Define if EOWNERDEAD exists. */
 #undef HAVE_EOWNERDEAD
 
+/* Define if EPROTO exists. */
+#undef HAVE_EPROTO
+
 /* Define to 1 if you have the `expf' function. */
 #undef HAVE_EXPF
 
Index: acinclude.m4
===================================================================
--- acinclude.m4	(revision 127771)
+++ acinclude.m4	(working copy)
@@ -1282,6 +1282,26 @@
     AC_DEFINE(HAVE_ENOTRECOVERABLE, 1, [Define if ENOTRECOVERABLE exists.])
   fi
 
+  AC_MSG_CHECKING([for ENOLINK])
+  AC_CACHE_VAL(ac_system_error3, [
+  AC_TRY_COMPILE([#include <errno.h>], [ int i = ENOLINK; ],
+             [ac_system_error3=yes], [ac_system_error3=no])
+  ])
+  AC_MSG_RESULT($ac_system_error3)
+  if test x"$ac_system_error3" = x"yes"; then
+    AC_DEFINE(HAVE_ENOLINK, 1, [Define if ENOLINK exists.])
+  fi
+
+  AC_MSG_CHECKING([for EPROTO])
+  AC_CACHE_VAL(ac_system_error_4, [
+  AC_TRY_COMPILE([#include <errno.h>], [ int i = EPROTO; ],
+             [ac_system_error_4=yes], [ac_system_error_4=no])
+  ])
+  AC_MSG_RESULT($ac_system_error_4)
+  if test x"$ac_system_error_4" = x"yes"; then
+    AC_DEFINE(HAVE_EPROTO, 1, [Define if EPROTO exists.])
+  fi
+
   AC_MSG_CHECKING([for sys_nerr])
   AC_CACHE_VAL(ac_system_error3, [
   AC_TRY_COMPILE([#include <errno.h> ], [ int i = sys_nerr; ],

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [v3] system_error
  2007-08-24 15:45   ` Benjamin Kosnik
@ 2007-08-25 15:26     ` Gerald Pfeifer
  2007-08-27 21:04       ` Benjamin Kosnik
  0 siblings, 1 reply; 12+ messages in thread
From: Gerald Pfeifer @ 2007-08-25 15:26 UTC (permalink / raw)
  To: Benjamin Kosnik; +Cc: Krister Walfridsson, libstdc++, gcc-patches

On Fri, 24 Aug 2007, Benjamin Kosnik wrote:
> Here. This fixes the netbsd issue.

Thanks.  I am afraid FreeBSD (i386-unknown-freebsd6.1) is still broken,
though:

In file included from
/sw/test/GCC/trunk/libstdc++-v3/src/system_error.cc:32:
/usr/nabil-files/pfeifer/OBJ-0824-2228/i386-unknown-freebsd6.2/libstdc++-v3/
include/system_error:100: error: 'ENODATA' was not declared in this scope
/usr/nabil-files/pfeifer/OBJ-0824-2228/i386-unknown-freebsd6.2/libstdc++-v3/
include/system_error:104: error: 'ENOSR' was not declared in this scope
/usr/nabil-files/pfeifer/OBJ-0824-2228/i386-unknown-freebsd6.2/libstdc++-v3/
include/system_error:111: error: 'ENOSTR' was not declared in this scope
/usr/nabil-files/pfeifer/OBJ-0824-2228/i386-unknown-freebsd6.2/libstdc++-v3/
include/system_error:135: error: 'ETIME' was not declared in this scope
gmake[4]: *** [system_error.lo] Error 1
gmake[4]: Leaving directory

Gerald

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [v3] system_error
  2007-08-25 15:26     ` Gerald Pfeifer
@ 2007-08-27 21:04       ` Benjamin Kosnik
  2007-08-29 17:24         ` Gerald Pfeifer
  0 siblings, 1 reply; 12+ messages in thread
From: Benjamin Kosnik @ 2007-08-27 21:04 UTC (permalink / raw)
  To: Gerald Pfeifer; +Cc: Krister Walfridsson, libstdc++, gcc-patches


> include/system_error:100: error: 'ENODATA' was not declared in this
> include/system_error:104: error: 'ENOSR' was not declared in this
> include/system_error:111: error: 'ENOSTR' was not declared in this
> include/system_error:135: error: 'ETIME' was not declared in this

ok. well, I suppose these could be checked just like the other macros
were checked for netbsd.

this won't help with the cygwin case though. And I suppose we'll have
to come up with a substitute for those platforms that don't implement
the necessary bits.

-benjamin

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [v3] system_error
  2007-08-27 21:04       ` Benjamin Kosnik
@ 2007-08-29 17:24         ` Gerald Pfeifer
  2007-08-29 17:36           ` bkoz
  2007-08-29 20:23           ` Benjamin Kosnik
  0 siblings, 2 replies; 12+ messages in thread
From: Gerald Pfeifer @ 2007-08-29 17:24 UTC (permalink / raw)
  To: Benjamin Kosnik; +Cc: Krister Walfridsson, libstdc++, gcc-patches

On Mon, 27 Aug 2007, Benjamin Kosnik wrote:
>> include/system_error:100: error: 'ENODATA' was not declared in this
>> include/system_error:104: error: 'ENOSR' was not declared in this
>> include/system_error:111: error: 'ENOSTR' was not declared in this
>> include/system_error:135: error: 'ETIME' was not declared in this
> ok. well, I suppose these could be checked just like the other macros
> were checked for netbsd.

Is this something you are planning to do?  Right now your patch broke
the bootstrap on FreeBSD, and I do not have a setup where I could fix
this myself.

Thanks,
Gerald

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [v3] system_error
  2007-08-29 17:24         ` Gerald Pfeifer
@ 2007-08-29 17:36           ` bkoz
  2007-09-02 21:59             ` Gerald Pfeifer
  2007-08-29 20:23           ` Benjamin Kosnik
  1 sibling, 1 reply; 12+ messages in thread
From: bkoz @ 2007-08-29 17:36 UTC (permalink / raw)
  To: Gerald Pfeifer; +Cc: Krister Walfridsson, libstdc++, gcc-patches

> Is this something you are planning to do?  Right now your patch broke
> the bootstrap on FreeBSD, and I do not have a setup where I could fix
> this myself.

I'll fix these today. Cygwin issues will have to wait a bit.

-benjamin

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [v3] system_error
  2007-08-29 17:24         ` Gerald Pfeifer
  2007-08-29 17:36           ` bkoz
@ 2007-08-29 20:23           ` Benjamin Kosnik
  2007-09-06 20:28             ` Gerald Pfeifer
  1 sibling, 1 reply; 12+ messages in thread
From: Benjamin Kosnik @ 2007-08-29 20:23 UTC (permalink / raw)
  To: Gerald Pfeifer; +Cc: Krister Walfridsson, libstdc++, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 54 bytes --]


This is the FreeBSD fix.

tested x86/linux

-benjamin

[-- Attachment #2: p.20070829-1 --]
[-- Type: application/octet-stream, Size: 6215 bytes --]

2007-08-29  Benjamin Kosnik  <bkoz@redhat.com>

	* acinclude.m4 (GLIBCXX_CHECK_SYSTEM_ERROR): Add ENODATA, ENOSR,
	ENOSTR, ETIME for freebsd.	
	* configure: Regenerate.
	* include/std/system_error: Guard.	
	* testsuite/19_diagnostics/headers/system_error/
	types_std_c++0x.cc: Same.
	* testsuite/19_diagnostics/error_category/cons/copy_neg.cc: Adjust
	line numbers.

Index: include/std/system_error
===================================================================
--- include/std/system_error	(revision 127911)
+++ include/std/system_error	(working copy)
@@ -93,22 +93,35 @@
       network_unreachable = 			ENETUNREACH,
       no_buffer_space = 			ENOBUFS,
       no_child_process = 			ECHILD,
+
 #ifdef _GLIBCXX_HAVE_ENOLINK
       no_link = 				ENOLINK,
 #endif
       no_lock_available = 			ENOLCK,
+
+#ifdef _GLIBCXX_HAVE_ENODATA
       no_message_available = 			ENODATA, 
+#endif
+
       no_message = 				ENOMSG, 
       no_protocol_option = 			ENOPROTOOPT,
       no_space_on_device = 			ENOSPC,
+
+#ifdef _GLIBCXX_HAVE_ENOSR
       no_stream_resources = 			ENOSR,
+#endif
+
       no_such_device_or_address = 		ENXIO,
       no_such_device = 				ENODEV,
       no_such_file_or_directory = 		ENOENT,
       no_such_process = 			ESRCH,
       not_a_directory = 			ENOTDIR,
       not_a_socket = 				ENOTSOCK,
+
+#ifdef _GLIBCXX_HAVE_ENOSTR
       not_a_stream = 				ENOSTR,
+#endif
+
       not_connected = 				ENOTCONN,
       not_enough_memory = 			ENOMEM,
       not_supported = 				ENOTSUP,
@@ -132,7 +145,11 @@
 #ifdef _GLIBCXX_HAVE_ENOTRECOVERABLE
       state_not_recoverable = 			ENOTRECOVERABLE,
 #endif
+
+#ifdef _GLIBCXX_HAVE_ETIME
       stream_timeout = 				ETIME,
+#endif
+
       text_file_busy = 				ETXTBSY,
       timed_out = 				ETIMEDOUT,
       too_many_files_open_in_system = 		ENFILE,
Index: testsuite/19_diagnostics/error_category/cons/copy_neg.cc
===================================================================
--- testsuite/19_diagnostics/error_category/cons/copy_neg.cc	(revision 127911)
+++ testsuite/19_diagnostics/error_category/cons/copy_neg.cc	(working copy)
@@ -50,7 +50,7 @@
   return 0;
 }
 
-// { dg-error "is private" "" { target *-*-* } 166 }
+// { dg-error "is private" "" { target *-*-* } 183 }
 // { dg-error "within this context" "" { target *-*-* } 29 }
 // { dg-error "first required here" "" { target *-*-* } 48 }
 // { dg-excess-errors "copy constructor" }
Index: testsuite/19_diagnostics/headers/system_error/types_std_c++0x.cc
===================================================================
--- testsuite/19_diagnostics/headers/system_error/types_std_c++0x.cc	(revision 127911)
+++ testsuite/19_diagnostics/headers/system_error/types_std_c++0x.cc	(working copy)
@@ -73,19 +73,31 @@
 #endif
 
   using std::no_lock_available; 
+
+#ifdef _GLIBCXX_HAVE_ENODATA
   using std::no_message_available; 
+#endif
+
   using std::no_message; 
   using std::no_posix_equivalent; 
   using std::no_protocol_option; 
   using std::no_space_on_device;
+
+#ifdef _GLIBCXX_HAVE_ENOSR
   using std::no_stream_resources; 
+#endif
+
   using std::no_such_device_or_address; 
   using std::no_such_device; 	
   using std::no_such_file_or_directory; 
   using std::no_such_process; 	
   using std::not_a_directory; 
   using std::not_a_socket; 
+
+#ifdef _GLIBCXX_HAVE_ENOSTR
   using std::not_a_stream; 
+#endif
+
   using std::not_connected; 
   using std::not_enough_memory;
   using std::not_supported;
@@ -115,7 +127,10 @@
   using std::state_not_recoverable; 
 #endif
 
+#ifdef _GLIBCXX_HAVE_ETIME
   using std::stream_timeout; 
+#endif
+
   using std::text_file_busy; 
   using std::timed_out; 
   using std::too_many_files_open_in_system; 
Index: config.h.in
===================================================================
--- config.h.in	(revision 127911)
+++ config.h.in	(working copy)
@@ -63,9 +63,18 @@
 /* Define to 1 if you have the <endian.h> header file. */
 #undef HAVE_ENDIAN_H
 
+/* Define if ENODATA exists. */
+#undef HAVE_ENODATA
+
 /* Define if ENOLINK exists. */
 #undef HAVE_ENOLINK
 
+/* Define if ENOSR exists. */
+#undef HAVE_ENOSR
+
+/* Define if ENOSTR exists. */
+#undef HAVE_ENOSTR
+
 /* Define if ENOTRECOVERABLE exists. */
 #undef HAVE_ENOTRECOVERABLE
 
@@ -75,6 +84,9 @@
 /* Define if EPROTO exists. */
 #undef HAVE_EPROTO
 
+/* Define if ETIME exists. */
+#undef HAVE_ETIME
+
 /* Define to 1 if you have the `expf' function. */
 #undef HAVE_EXPF
 
Index: acinclude.m4
===================================================================
--- acinclude.m4	(revision 127911)
+++ acinclude.m4	(working copy)
@@ -1302,6 +1302,46 @@
     AC_DEFINE(HAVE_EPROTO, 1, [Define if EPROTO exists.])
   fi
 
+  AC_MSG_CHECKING([for ENODATA])
+  AC_CACHE_VAL(ac_system_error_5, [
+  AC_TRY_COMPILE([#include <errno.h>], [ int i = ENODATA; ],
+             [ac_system_error_5=yes], [ac_system_error_5=no])
+  ])
+  AC_MSG_RESULT($ac_system_error_5)
+  if test x"$ac_system_error_5" = x"yes"; then
+    AC_DEFINE(HAVE_ENODATA, 1, [Define if ENODATA exists.])
+  fi
+
+  AC_MSG_CHECKING([for ENOSR])
+  AC_CACHE_VAL(ac_system_error_6, [
+  AC_TRY_COMPILE([#include <errno.h>], [ int i = ENOSR; ],
+             [ac_system_error_6=yes], [ac_system_error_6=no])
+  ])
+  AC_MSG_RESULT($ac_system_error_6)
+  if test x"$ac_system_error_6" = x"yes"; then
+    AC_DEFINE(HAVE_ENOSR, 1, [Define if ENOSR exists.])
+  fi
+
+  AC_MSG_CHECKING([for ENOSTR])
+  AC_CACHE_VAL(ac_system_error_7, [
+  AC_TRY_COMPILE([#include <errno.h>], [ int i = ENOSTR; ],
+             [ac_system_error_7=yes], [ac_system_error_7=no])
+  ])
+  AC_MSG_RESULT($ac_system_error_7)
+  if test x"$ac_system_error_7" = x"yes"; then
+    AC_DEFINE(HAVE_ENOSTR, 1, [Define if ENOSTR exists.])
+  fi
+
+  AC_MSG_CHECKING([for ETIME])
+  AC_CACHE_VAL(ac_system_error_8, [
+  AC_TRY_COMPILE([#include <errno.h>], [ int i = ETIME; ],
+             [ac_system_error_8=yes], [ac_system_error_8=no])
+  ])
+  AC_MSG_RESULT($ac_system_error_8)
+  if test x"$ac_system_error_8" = x"yes"; then
+    AC_DEFINE(HAVE_ETIME, 1, [Define if ETIME exists.])
+  fi
+
   AC_MSG_CHECKING([for sys_nerr])
   AC_CACHE_VAL(ac_system_error9, [
   AC_TRY_COMPILE([#include <errno.h> ], [ int i = sys_nerr; ],

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [v3] system_error
  2007-08-29 17:36           ` bkoz
@ 2007-09-02 21:59             ` Gerald Pfeifer
  0 siblings, 0 replies; 12+ messages in thread
From: Gerald Pfeifer @ 2007-09-02 21:59 UTC (permalink / raw)
  To: bkoz; +Cc: Krister Walfridsson, libstdc++, gcc-patches

On Wed, 29 Aug 2007, bkoz wrote:
>> Is this something you are planning to do?  Right now your patch broke
>> the bootstrap on FreeBSD, and I do not have a setup where I could fix
>> this myself.
> I'll fix these today. Cygwin issues will have to wait a bit.

Thanks!  I'm happy to confirm, even with a bit of delay on my side,
that indeed FreeBSD is now happily (and correctly) building again.

Gerald

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [v3] system_error
  2007-08-29 20:23           ` Benjamin Kosnik
@ 2007-09-06 20:28             ` Gerald Pfeifer
  0 siblings, 0 replies; 12+ messages in thread
From: Gerald Pfeifer @ 2007-09-06 20:28 UTC (permalink / raw)
  To: Benjamin Kosnik; +Cc: Krister Walfridsson, libstdc++, gcc-patches

[-- Attachment #1: Type: TEXT/PLAIN, Size: 115 bytes --]

On Wed, 29 Aug 2007, Benjamin Kosnik wrote:
> This is the FreeBSD fix.

Thanks a lot -- works like a charm!

Gerald

[-- Attachment #2: Type: APPLICATION/OCTET-STREAM, Size: 6215 bytes --]

2007-08-29  Benjamin Kosnik  <bkoz@redhat.com>

	* acinclude.m4 (GLIBCXX_CHECK_SYSTEM_ERROR): Add ENODATA, ENOSR,
	ENOSTR, ETIME for freebsd.	
	* configure: Regenerate.
	* include/std/system_error: Guard.	
	* testsuite/19_diagnostics/headers/system_error/
	types_std_c++0x.cc: Same.
	* testsuite/19_diagnostics/error_category/cons/copy_neg.cc: Adjust
	line numbers.

Index: include/std/system_error
===================================================================
--- include/std/system_error	(revision 127911)
+++ include/std/system_error	(working copy)
@@ -93,22 +93,35 @@
       network_unreachable = 			ENETUNREACH,
       no_buffer_space = 			ENOBUFS,
       no_child_process = 			ECHILD,
+
 #ifdef _GLIBCXX_HAVE_ENOLINK
       no_link = 				ENOLINK,
 #endif
       no_lock_available = 			ENOLCK,
+
+#ifdef _GLIBCXX_HAVE_ENODATA
       no_message_available = 			ENODATA, 
+#endif
+
       no_message = 				ENOMSG, 
       no_protocol_option = 			ENOPROTOOPT,
       no_space_on_device = 			ENOSPC,
+
+#ifdef _GLIBCXX_HAVE_ENOSR
       no_stream_resources = 			ENOSR,
+#endif
+
       no_such_device_or_address = 		ENXIO,
       no_such_device = 				ENODEV,
       no_such_file_or_directory = 		ENOENT,
       no_such_process = 			ESRCH,
       not_a_directory = 			ENOTDIR,
       not_a_socket = 				ENOTSOCK,
+
+#ifdef _GLIBCXX_HAVE_ENOSTR
       not_a_stream = 				ENOSTR,
+#endif
+
       not_connected = 				ENOTCONN,
       not_enough_memory = 			ENOMEM,
       not_supported = 				ENOTSUP,
@@ -132,7 +145,11 @@
 #ifdef _GLIBCXX_HAVE_ENOTRECOVERABLE
       state_not_recoverable = 			ENOTRECOVERABLE,
 #endif
+
+#ifdef _GLIBCXX_HAVE_ETIME
       stream_timeout = 				ETIME,
+#endif
+
       text_file_busy = 				ETXTBSY,
       timed_out = 				ETIMEDOUT,
       too_many_files_open_in_system = 		ENFILE,
Index: testsuite/19_diagnostics/error_category/cons/copy_neg.cc
===================================================================
--- testsuite/19_diagnostics/error_category/cons/copy_neg.cc	(revision 127911)
+++ testsuite/19_diagnostics/error_category/cons/copy_neg.cc	(working copy)
@@ -50,7 +50,7 @@
   return 0;
 }
 
-// { dg-error "is private" "" { target *-*-* } 166 }
+// { dg-error "is private" "" { target *-*-* } 183 }
 // { dg-error "within this context" "" { target *-*-* } 29 }
 // { dg-error "first required here" "" { target *-*-* } 48 }
 // { dg-excess-errors "copy constructor" }
Index: testsuite/19_diagnostics/headers/system_error/types_std_c++0x.cc
===================================================================
--- testsuite/19_diagnostics/headers/system_error/types_std_c++0x.cc	(revision 127911)
+++ testsuite/19_diagnostics/headers/system_error/types_std_c++0x.cc	(working copy)
@@ -73,19 +73,31 @@
 #endif
 
   using std::no_lock_available; 
+
+#ifdef _GLIBCXX_HAVE_ENODATA
   using std::no_message_available; 
+#endif
+
   using std::no_message; 
   using std::no_posix_equivalent; 
   using std::no_protocol_option; 
   using std::no_space_on_device;
+
+#ifdef _GLIBCXX_HAVE_ENOSR
   using std::no_stream_resources; 
+#endif
+
   using std::no_such_device_or_address; 
   using std::no_such_device; 	
   using std::no_such_file_or_directory; 
   using std::no_such_process; 	
   using std::not_a_directory; 
   using std::not_a_socket; 
+
+#ifdef _GLIBCXX_HAVE_ENOSTR
   using std::not_a_stream; 
+#endif
+
   using std::not_connected; 
   using std::not_enough_memory;
   using std::not_supported;
@@ -115,7 +127,10 @@
   using std::state_not_recoverable; 
 #endif
 
+#ifdef _GLIBCXX_HAVE_ETIME
   using std::stream_timeout; 
+#endif
+
   using std::text_file_busy; 
   using std::timed_out; 
   using std::too_many_files_open_in_system; 
Index: config.h.in
===================================================================
--- config.h.in	(revision 127911)
+++ config.h.in	(working copy)
@@ -63,9 +63,18 @@
 /* Define to 1 if you have the <endian.h> header file. */
 #undef HAVE_ENDIAN_H
 
+/* Define if ENODATA exists. */
+#undef HAVE_ENODATA
+
 /* Define if ENOLINK exists. */
 #undef HAVE_ENOLINK
 
+/* Define if ENOSR exists. */
+#undef HAVE_ENOSR
+
+/* Define if ENOSTR exists. */
+#undef HAVE_ENOSTR
+
 /* Define if ENOTRECOVERABLE exists. */
 #undef HAVE_ENOTRECOVERABLE
 
@@ -75,6 +84,9 @@
 /* Define if EPROTO exists. */
 #undef HAVE_EPROTO
 
+/* Define if ETIME exists. */
+#undef HAVE_ETIME
+
 /* Define to 1 if you have the `expf' function. */
 #undef HAVE_EXPF
 
Index: acinclude.m4
===================================================================
--- acinclude.m4	(revision 127911)
+++ acinclude.m4	(working copy)
@@ -1302,6 +1302,46 @@
     AC_DEFINE(HAVE_EPROTO, 1, [Define if EPROTO exists.])
   fi
 
+  AC_MSG_CHECKING([for ENODATA])
+  AC_CACHE_VAL(ac_system_error_5, [
+  AC_TRY_COMPILE([#include <errno.h>], [ int i = ENODATA; ],
+             [ac_system_error_5=yes], [ac_system_error_5=no])
+  ])
+  AC_MSG_RESULT($ac_system_error_5)
+  if test x"$ac_system_error_5" = x"yes"; then
+    AC_DEFINE(HAVE_ENODATA, 1, [Define if ENODATA exists.])
+  fi
+
+  AC_MSG_CHECKING([for ENOSR])
+  AC_CACHE_VAL(ac_system_error_6, [
+  AC_TRY_COMPILE([#include <errno.h>], [ int i = ENOSR; ],
+             [ac_system_error_6=yes], [ac_system_error_6=no])
+  ])
+  AC_MSG_RESULT($ac_system_error_6)
+  if test x"$ac_system_error_6" = x"yes"; then
+    AC_DEFINE(HAVE_ENOSR, 1, [Define if ENOSR exists.])
+  fi
+
+  AC_MSG_CHECKING([for ENOSTR])
+  AC_CACHE_VAL(ac_system_error_7, [
+  AC_TRY_COMPILE([#include <errno.h>], [ int i = ENOSTR; ],
+             [ac_system_error_7=yes], [ac_system_error_7=no])
+  ])
+  AC_MSG_RESULT($ac_system_error_7)
+  if test x"$ac_system_error_7" = x"yes"; then
+    AC_DEFINE(HAVE_ENOSTR, 1, [Define if ENOSTR exists.])
+  fi
+
+  AC_MSG_CHECKING([for ETIME])
+  AC_CACHE_VAL(ac_system_error_8, [
+  AC_TRY_COMPILE([#include <errno.h>], [ int i = ETIME; ],
+             [ac_system_error_8=yes], [ac_system_error_8=no])
+  ])
+  AC_MSG_RESULT($ac_system_error_8)
+  if test x"$ac_system_error_8" = x"yes"; then
+    AC_DEFINE(HAVE_ETIME, 1, [Define if ETIME exists.])
+  fi
+
   AC_MSG_CHECKING([for sys_nerr])
   AC_CACHE_VAL(ac_system_error9, [
   AC_TRY_COMPILE([#include <errno.h> ], [ int i = sys_nerr; ],

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2007-09-06 19:57 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-23 16:20 [v3] system_error Benjamin Kosnik
2007-08-23 19:43 ` Hans-Peter Nilsson
2007-08-23 20:36   ` Hans-Peter Nilsson
2007-08-24  9:16 ` Krister Walfridsson
2007-08-24 15:45   ` Benjamin Kosnik
2007-08-25 15:26     ` Gerald Pfeifer
2007-08-27 21:04       ` Benjamin Kosnik
2007-08-29 17:24         ` Gerald Pfeifer
2007-08-29 17:36           ` bkoz
2007-09-02 21:59             ` Gerald Pfeifer
2007-08-29 20:23           ` Benjamin Kosnik
2007-09-06 20:28             ` Gerald Pfeifer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).