Re: [patch] Bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-07-30 Thread Jean-Marc Lasgouttes
[EMAIL PROTECTED] (Jürgen Spitzmüller) writes:


 José Matos wrote:
   This is not in the patch, is this already in?
   The patch only shows the addition of __FreeBSD_kernel__ test.

 No, it replaces __FREEBSD__ with __FreeBSD__. I didn't know it is so (and 
 actually I didn't find a reference), but obviously the case matters.

Doh. Probably my fault.

JMarc


Re: [patch] Bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-07-30 Thread Jean-Marc Lasgouttes
[EMAIL PROTECTED] (Jürgen Spitzmüller) writes:


> José Matos wrote:
>>   This is not in the patch, is this already in?
>>   The patch only shows the addition of __FreeBSD_kernel__ test.
>
> No, it replaces __FREEBSD__ with __FreeBSD__. I didn't know it is so (and 
> actually I didn't find a reference), but obviously the case matters.

Doh. Probably my fault.

JMarc


Re: [patch] Bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-07-13 Thread Jürgen Spitzmüller
José Matos wrote:
   This is not in the patch, is this already in?
   The patch only shows the addition of __FreeBSD_kernel__ test.

No, it replaces __FREEBSD__ with __FreeBSD__. I didn't know it is so (and 
actually I didn't find a reference), but obviously the case matters.

  José, can this fo into 1.5.0?

   Yes.

OK. I'll commit.

Jürgen


Re: [patch] Bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-07-13 Thread José Matos
On Friday 13 July 2007 13:41:20 Jürgen Spitzmüller wrote:
 The attached patch seems to fix that bug finally, as Koji Yokota confirmed.

 Actually, I'm not sure defined(__FreeBSD_kernel__) is really needed -- this
 basically identifies GNU/kFreeBSD (that doesn't have __FreeBSD__ defined).

  It does not hurt either, I think. :-)

 The actual problem apparently was the casing of the macro.

  This is not in the patch, is this already in?
  The patch only shows the addition of __FreeBSD_kernel__ test.

 José, can this fo into 1.5.0?

  Yes.

 Jürgen

-- 
José Abílio


Re: [patch] Bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-07-13 Thread Jürgen Spitzmüller
José Matos wrote:
>   This is not in the patch, is this already in?
>   The patch only shows the addition of __FreeBSD_kernel__ test.

No, it replaces __FREEBSD__ with __FreeBSD__. I didn't know it is so (and 
actually I didn't find a reference), but obviously the case matters.

> > José, can this fo into 1.5.0?
>
>   Yes.

OK. I'll commit.

Jürgen


Re: [patch] Bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-07-13 Thread José Matos
On Friday 13 July 2007 13:41:20 Jürgen Spitzmüller wrote:
> The attached patch seems to fix that bug finally, as Koji Yokota confirmed.
>
> Actually, I'm not sure defined(__FreeBSD_kernel__) is really needed -- this
> basically identifies GNU/kFreeBSD (that doesn't have __FreeBSD__ defined).

  It does not hurt either, I think. :-)

> The actual problem apparently was the casing of the macro.

  This is not in the patch, is this already in?
  The patch only shows the addition of __FreeBSD_kernel__ test.

> José, can this fo into 1.5.0?

  Yes.

> Jürgen

-- 
José Abílio


Re: [PATCH] bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-06-27 Thread Jean-Marc Lasgouttes
 Jean-Marc == Jean-Marc Lasgouttes [EMAIL PROTECTED] writes:

 Peter == Peter Kümmel [EMAIL PROTECTED] writes:
Peter Is it correct that this line remains untouched?

Peter #if SIZEOF_WCHAR_T != 4  defined(__GNUC__) 
Peter defined(__GNUC_MINOR__)  __GNUC__ == 3  __GNUC_MINOR__  4

Jean-Marc No, and I do not know how I missed it. I think it should be

Jean-Marc #if ! defined(USE_WCHAR_T)  defined(__GNUC__) 
Jean-Marc defined(__GNUC_MINOR__)  __GNUC__ == 3  __GNUC_MINOR__
Jean-Marc  4

Jose, do I still have time to commit the following patch?

I did not add OpenBSD and NetBSD, since I'd rather have first hand
reports on what should be done.

The best probably would be to contact the port maintainers:
http://pkgsrc.se/editors/lyx-qt
http://ports.openbsd.nu/print/lyx

JMarc


Re: [PATCH] bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-06-27 Thread Jean-Marc Lasgouttes
 Jean-Marc == Jean-Marc Lasgouttes [EMAIL PROTECTED] writes:

[now with the patch!]

 Peter == Peter Kümmel [EMAIL PROTECTED] writes:
Peter Is it correct that this line remains untouched?

Peter #if SIZEOF_WCHAR_T != 4  defined(__GNUC__) 
Peter defined(__GNUC_MINOR__)  __GNUC__ == 3  __GNUC_MINOR__  4

Jean-Marc No, and I do not know how I missed it. I think it should be

Jean-Marc #if ! defined(USE_WCHAR_T)  defined(__GNUC__) 
Jean-Marc defined(__GNUC_MINOR__)  __GNUC__ == 3  __GNUC_MINOR__
Jean-Marc  4

Jose, do I still have time to commit the following patch?

I did not add OpenBSD and NetBSD, since I'd rather have first hand
reports on what should be done.

The best probably would be to contact the port maintainers:
http://pkgsrc.se/editors/lyx-qt
http://ports.openbsd.nu/print/lyx

JMarc

Index: src/support/docstream.cpp
===
--- src/support/docstream.cpp	(révision 18908)
+++ src/support/docstream.cpp	(copie de travail)
@@ -322,7 +322,7 @@ odocstream  operator(odocstream  os,
 
 }
 
-#if (!defined(HAVE_WCHAR_T) || SIZEOF_WCHAR_T != 4)  defined(__GNUC__)
+#if ! defined(USE_WCHAR_T)  defined(__GNUC__)
 // We get undefined references to these virtual methods. This looks like
 // a bug in gcc. The implementation here does not do anything useful, since
 // it is overriden in iconv_codecvt_facet.
Index: src/support/docstring.cpp
===
--- src/support/docstring.cpp	(révision 18908)
+++ src/support/docstring.cpp	(copie de travail)
@@ -217,7 +217,7 @@ lyx::docstring  operator+=(lyx::docstri
 
 } // namespace lyx
 
-#if (!defined(HAVE_WCHAR_T) || SIZEOF_WCHAR_T != 4)  defined(__GNUC__)
+#if ! defined(USE_WCHAR_T)  defined(__GNUC__)
 
 // gcc does not have proper locale facets for lyx::char_type if
 // sizeof(wchar_t) == 2, so we have to implement them on our own.
Index: src/support/types.h
===
--- src/support/types.h	(révision 18908)
+++ src/support/types.h	(copie de travail)
@@ -23,7 +23,7 @@
 namespace lyx {
 
 	/// The type used to hold characters in paragraphs
-#if defined(HAVE_WCHAR_T)  SIZEOF_WCHAR_T == 4
+#ifdef USE_WCHAR_T
 	// Prefer this if possible because GNU libstdc++ has usable
 	// std::ctypewchar_t locale facets but not
 	// std::ctypeboost::uint32_t. gcc older than 3.4 is also missing
Index: src/support/docstring.h
===
--- src/support/docstring.h	(révision 18908)
+++ src/support/docstring.h	(copie de travail)
@@ -98,7 +98,7 @@ lyx::docstring  operator+=(lyx::docstri
 } // namespace lyx
 
 
-#if SIZEOF_WCHAR_T != 4  defined(__GNUC__)  defined(__GNUC_MINOR__)  __GNUC__ == 3  __GNUC_MINOR__  4
+#if ! defined(USE_WCHAR_T)  defined(__GNUC__)  defined(__GNUC_MINOR__)  __GNUC__ == 3  __GNUC_MINOR__  4
 // Missing char_traits methods in gcc 3.3 and older. Taken from gcc 4.2svn.
 namespace std {
 
Index: configure.ac
===
--- configure.ac	(révision 18908)
+++ configure.ac	(copie de travail)
@@ -383,8 +383,18 @@ int mkstemp(char*);
 #  define WANT_GETFILEATTRIBUTESEX_WRAPPER 1
 #endif
 
-#if defined(HAVE_WCHAR_T)  SIZEOF_WCHAR_T == 4
-#  define LIBC_WCTYPE_USES_UCS4
+/*
+ * the FreeBSD libc uses UCS4, but libstdc++ has no proper wchar_t
+ * support compiled in:
+ * http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html#3_9
+ * And we are not interested at all what libc
+ * does: What we need is a 32bit wide wchar_t, and a libstdc++ that
+ * has the needed wchar_t support and uses UCS4. Whether it
+ * implements this with the help of libc, or whether it has own code
+ * does not matter for us, because we don't use libc directly (Georg)
+*/
+#if defined(HAVE_WCHAR_T)  SIZEOF_WCHAR_T == 4  ! defined(__FREEBSD__)
+#  define USE_WCHAR_T
 #endif
 
 #endif


Re: [PATCH] bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-06-27 Thread José Matos
On Wednesday 27 June 2007 09:46:38 Jean-Marc Lasgouttes wrote:
 Jose, do I still have time to commit the following patch?

Since I was not sure to get you, and due to my (extremely) busy schedule I 
will commit this myself and release RC2 as soon as the tests finishes. 

-- 
José Abílio


Re: [PATCH] bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-06-27 Thread Jean-Marc Lasgouttes
 José == José Matos [EMAIL PROTECTED] writes:

José On Wednesday 27 June 2007 09:46:38 Jean-Marc Lasgouttes wrote:
 Jose, do I still have time to commit the following patch?

José Since I was not sure to get you, and due to my (extremely) busy
José schedule I will commit this myself and release RC2 as soon as
José the tests finishes.

Thanks.

JMarc



Re: [PATCH] bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-06-27 Thread Jean-Marc Lasgouttes
> "Jean-Marc" == Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:

> "Peter" == Peter Kümmel <[EMAIL PROTECTED]> writes:
Peter> Is it correct that this line remains untouched?

Peter> #if SIZEOF_WCHAR_T != 4 && defined(__GNUC__) &&
Peter> defined(__GNUC_MINOR__) && __GNUC__ == 3 && __GNUC_MINOR__ < 4

Jean-Marc> No, and I do not know how I missed it. I think it should be

Jean-Marc> #if ! defined(USE_WCHAR_T) && defined(__GNUC__) &&
Jean-Marc> defined(__GNUC_MINOR__) && __GNUC__ == 3 && __GNUC_MINOR__
Jean-Marc> < 4

Jose, do I still have time to commit the following patch?

I did not add OpenBSD and NetBSD, since I'd rather have first hand
reports on what should be done.

The best probably would be to contact the port maintainers:
http://pkgsrc.se/editors/lyx-qt
http://ports.openbsd.nu/print/lyx

JMarc


Re: [PATCH] bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-06-27 Thread Jean-Marc Lasgouttes
> "Jean-Marc" == Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:

[now with the patch!]

> "Peter" == Peter Kümmel <[EMAIL PROTECTED]> writes:
Peter> Is it correct that this line remains untouched?

Peter> #if SIZEOF_WCHAR_T != 4 && defined(__GNUC__) &&
Peter> defined(__GNUC_MINOR__) && __GNUC__ == 3 && __GNUC_MINOR__ < 4

Jean-Marc> No, and I do not know how I missed it. I think it should be

Jean-Marc> #if ! defined(USE_WCHAR_T) && defined(__GNUC__) &&
Jean-Marc> defined(__GNUC_MINOR__) && __GNUC__ == 3 && __GNUC_MINOR__
Jean-Marc> < 4

Jose, do I still have time to commit the following patch?

I did not add OpenBSD and NetBSD, since I'd rather have first hand
reports on what should be done.

The best probably would be to contact the port maintainers:
http://pkgsrc.se/editors/lyx-qt
http://ports.openbsd.nu/print/lyx

JMarc

Index: src/support/docstream.cpp
===
--- src/support/docstream.cpp	(révision 18908)
+++ src/support/docstream.cpp	(copie de travail)
@@ -322,7 +322,7 @@ odocstream & operator<<(odocstream & os,
 
 }
 
-#if (!defined(HAVE_WCHAR_T) || SIZEOF_WCHAR_T != 4) && defined(__GNUC__)
+#if ! defined(USE_WCHAR_T) && defined(__GNUC__)
 // We get undefined references to these virtual methods. This looks like
 // a bug in gcc. The implementation here does not do anything useful, since
 // it is overriden in iconv_codecvt_facet.
Index: src/support/docstring.cpp
===
--- src/support/docstring.cpp	(révision 18908)
+++ src/support/docstring.cpp	(copie de travail)
@@ -217,7 +217,7 @@ lyx::docstring & operator+=(lyx::docstri
 
 } // namespace lyx
 
-#if (!defined(HAVE_WCHAR_T) || SIZEOF_WCHAR_T != 4) && defined(__GNUC__)
+#if ! defined(USE_WCHAR_T) && defined(__GNUC__)
 
 // gcc does not have proper locale facets for lyx::char_type if
 // sizeof(wchar_t) == 2, so we have to implement them on our own.
Index: src/support/types.h
===
--- src/support/types.h	(révision 18908)
+++ src/support/types.h	(copie de travail)
@@ -23,7 +23,7 @@
 namespace lyx {
 
 	/// The type used to hold characters in paragraphs
-#if defined(HAVE_WCHAR_T) && SIZEOF_WCHAR_T == 4
+#ifdef USE_WCHAR_T
 	// Prefer this if possible because GNU libstdc++ has usable
 	// std::ctype locale facets but not
 	// std::ctype. gcc older than 3.4 is also missing
Index: src/support/docstring.h
===
--- src/support/docstring.h	(révision 18908)
+++ src/support/docstring.h	(copie de travail)
@@ -98,7 +98,7 @@ lyx::docstring & operator+=(lyx::docstri
 } // namespace lyx
 
 
-#if SIZEOF_WCHAR_T != 4 && defined(__GNUC__) && defined(__GNUC_MINOR__) && __GNUC__ == 3 && __GNUC_MINOR__ < 4
+#if ! defined(USE_WCHAR_T) && defined(__GNUC__) && defined(__GNUC_MINOR__) && __GNUC__ == 3 && __GNUC_MINOR__ < 4
 // Missing char_traits methods in gcc 3.3 and older. Taken from gcc 4.2svn.
 namespace std {
 
Index: configure.ac
===
--- configure.ac	(révision 18908)
+++ configure.ac	(copie de travail)
@@ -383,8 +383,18 @@ int mkstemp(char*);
 #  define WANT_GETFILEATTRIBUTESEX_WRAPPER 1
 #endif
 
-#if defined(HAVE_WCHAR_T) && SIZEOF_WCHAR_T == 4
-#  define LIBC_WCTYPE_USES_UCS4
+/*
+ * the FreeBSD libc uses UCS4, but libstdc++ has no proper wchar_t
+ * support compiled in:
+ * http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html#3_9
+ * And we are not interested at all what libc
+ * does: What we need is a 32bit wide wchar_t, and a libstdc++ that
+ * has the needed wchar_t support and uses UCS4. Whether it
+ * implements this with the help of libc, or whether it has own code
+ * does not matter for us, because we don't use libc directly (Georg)
+*/
+#if defined(HAVE_WCHAR_T) && SIZEOF_WCHAR_T == 4 && ! defined(__FREEBSD__)
+#  define USE_WCHAR_T
 #endif
 
 #endif


Re: [PATCH] bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-06-27 Thread José Matos
On Wednesday 27 June 2007 09:46:38 Jean-Marc Lasgouttes wrote:
> Jose, do I still have time to commit the following patch?

Since I was not sure to get you, and due to my (extremely) busy schedule I 
will commit this myself and release RC2 as soon as the tests finishes. 

-- 
José Abílio


Re: [PATCH] bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-06-27 Thread Jean-Marc Lasgouttes
> "José" == José Matos <[EMAIL PROTECTED]> writes:

José> On Wednesday 27 June 2007 09:46:38 Jean-Marc Lasgouttes wrote:
>> Jose, do I still have time to commit the following patch?

José> Since I was not sure to get you, and due to my (extremely) busy
José> schedule I will commit this myself and release RC2 as soon as
José> the tests finishes.

Thanks.

JMarc



Re: [PATCH] bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-06-26 Thread Georg Baum
Am Dienstag, 26. Juni 2007 14:17 schrieb Jean-Marc Lasgouttes:
 
 http://bugzilla.lyx.org/show_bug.cgi?id=3537
 
 This bug comes from the fact that FreeBSD (in it current incarnations
 at least) does not have proper support for wchar_t.
 
 I did not rename LIBC_WCTYPE_USES_UCS4 to something more readable like
 USE_WCHAR_T. Should I?

I think so, since AFAIK LIBC_WCTYPE_USES_UCS4 would be wrong: From what I 
understand from the past discussions the FreeBSD libc uses UCS4, but 
libstdc++ has no proper wchar_t support compiled in. And we are not 
interested at all what libc does: What we need is a 32bit wide wchar_t, 
and a libstdc++ that has the needed wchar_t support and uses UCS4. Whether 
it implements this with the help of libc, or whether it has own code does 
not matter for us, because we don't use libc directly (we did at some 
point in time, but it turned out that it did not work).

 Koji, does the patch work for you?
 
 Georg, does it look right to you?

Yes. But I think that a comment should be added in configure.ac why FreeBSD 
is excluded, probably pointing to the libstdc++ bug report (or the 
lyx-devel thread). Then it will be easy to check whether the FreeBSD 
exclusion can be removed or not if somebody stumbles over the test and 
wonders why it is there.


Georg


Re: [PATCH] bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-06-26 Thread José Matos
On Tuesday 26 June 2007 14:39:05 Georg Baum wrote:
 Yes. But I think that a comment should be added in configure.ac why FreeBSD
 is excluded, probably pointing to the libstdc++ bug report (or the
 lyx-devel thread). Then it will be easy to check whether the FreeBSD
 exclusion can be removed or not if somebody stumbles over the test and
 wonders why it is there.

  FWIW this is a bug fix that I would like to have even after RC2 and before 
1.5.0. If it works, of course. :-)

 Georg

-- 
José Abílio


Re: [PATCH] bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-06-26 Thread Bo Peng

If the patch works, similar changes should be done to cmake and scons.



The scons part is easy:

Index: development/scons/SConstruct
===
--- development/scons/SConstruct(revision 18892)
+++ development/scons/SConstruct(working copy)
@@ -814,7 +814,7 @@
#  define WANT_GETFILEATTRIBUTESEX_WRAPPER 1
#endif

-#if defined(HAVE_WCHAR_T)  SIZEOF_WCHAR_T == 4
+#if defined(HAVE_WCHAR_T)  SIZEOF_WCHAR_T == 4  ! defined(__FREEBSD__)
#  define LIBC_WCTYPE_USES_UCS4
#endif


Re: [PATCH] bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-06-26 Thread Jean-Marc Lasgouttes
 Georg == Georg Baum [EMAIL PROTECTED] writes:

Georg Yes. But I think that a comment should be added in configure.ac
Georg why FreeBSD is excluded, probably pointing to the libstdc++ bug
Georg report (or the lyx-devel thread). Then it will be easy to check
Georg whether the FreeBSD exclusion can be removed or not if somebody
Georg stumbles over the test and wonders why it is there.

That would be this (with shamelessly stolen text).

JMarc

Index: src/support/docstream.cpp
===
--- src/support/docstream.cpp	(révision 18889)
+++ src/support/docstream.cpp	(copie de travail)
@@ -322,7 +322,7 @@ odocstream  operator(odocstream  os,
 
 }
 
-#if (!defined(HAVE_WCHAR_T) || SIZEOF_WCHAR_T != 4)  defined(__GNUC__)
+#if ! defined(USE_WCHAR_T)  defined(__GNUC__)
 // We get undefined references to these virtual methods. This looks like
 // a bug in gcc. The implementation here does not do anything useful, since
 // it is overriden in iconv_codecvt_facet.
Index: src/support/docstring.cpp
===
--- src/support/docstring.cpp	(révision 18889)
+++ src/support/docstring.cpp	(copie de travail)
@@ -217,7 +217,7 @@ lyx::docstring  operator+=(lyx::docstri
 
 } // namespace lyx
 
-#if (!defined(HAVE_WCHAR_T) || SIZEOF_WCHAR_T != 4)  defined(__GNUC__)
+#if ! defined(USE_WCHAR_T)  defined(__GNUC__)
 
 // gcc does not have proper locale facets for lyx::char_type if
 // sizeof(wchar_t) == 2, so we have to implement them on our own.
Index: src/support/types.h
===
--- src/support/types.h	(révision 18889)
+++ src/support/types.h	(copie de travail)
@@ -23,7 +23,7 @@
 namespace lyx {
 
 	/// The type used to hold characters in paragraphs
-#if defined(HAVE_WCHAR_T)  SIZEOF_WCHAR_T == 4
+#ifdef USE_WCHAR_T
 	// Prefer this if possible because GNU libstdc++ has usable
 	// std::ctypewchar_t locale facets but not
 	// std::ctypeboost::uint32_t. gcc older than 3.4 is also missing
Index: configure.ac
===
--- configure.ac	(révision 18889)
+++ configure.ac	(copie de travail)
@@ -383,8 +383,18 @@ int mkstemp(char*);
 #  define WANT_GETFILEATTRIBUTESEX_WRAPPER 1
 #endif
 
-#if defined(HAVE_WCHAR_T)  SIZEOF_WCHAR_T == 4
-#  define LIBC_WCTYPE_USES_UCS4
+/*
+ * the FreeBSD libc uses UCS4, but libstdc++ has no proper wchar_t
+ * support compiled in:
+ * http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html#3_9
+ * And we are not interested at all what libc
+ * does: What we need is a 32bit wide wchar_t, and a libstdc++ that
+ * has the needed wchar_t support and uses UCS4. Whether it
+ * implements this with the help of libc, or whether it has own code
+ * does not matter for us, because we don't use libc directly (Georg)
+*/
+#if defined(HAVE_WCHAR_T)  SIZEOF_WCHAR_T == 4  ! defined(__FREEBSD__)
+#  define USE_WCHAR_T
 #endif
 
 #endif


Re: [PATCH] bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-06-26 Thread Enrico Forestieri
On Tue, Jun 26, 2007 at 04:47:25PM +0200, Jean-Marc Lasgouttes wrote:

 +/*
 + * the FreeBSD libc uses UCS4, but libstdc++ has no proper wchar_t
 + * support compiled in:
 + * http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html#3_9
 + * And we are not interested at all what libc
 + * does: What we need is a 32bit wide wchar_t, and a libstdc++ that
 + * has the needed wchar_t support and uses UCS4. Whether it
 + * implements this with the help of libc, or whether it has own code
 + * does not matter for us, because we don't use libc directly (Georg)
 +*/
 +#if defined(HAVE_WCHAR_T)  SIZEOF_WCHAR_T == 4  ! defined(__FREEBSD__)
 +#  define USE_WCHAR_T
  #endif

According to http://www.netbsd.org/about/roadmap.html, this is also
true for NetBSD, so I would also add  !defined(__NetBSD__) there.

-- 
Enrico


Re: [PATCH] bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-06-26 Thread Bo Peng

According to http://www.netbsd.org/about/roadmap.html, this is also
true for NetBSD, so I would also add  !defined(__NetBSD__) there.


Are you sure about the name here? Not __NETBSD__?

Bo


Re: [PATCH] bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-06-26 Thread Peter Kümmel
Bo Peng wrote:
 According to http://www.netbsd.org/about/roadmap.html, this is also
 true for NetBSD, so I would also add  !defined(__NetBSD__) there.
 
 Are you sure about the name here? Not __NETBSD__?
 
 Bo
 

Seems he is right:
http://predef.sourceforge.net/preos.html#sec23

And the patch.

Peter
Index: src/support/docstream.cpp
===
--- src/support/docstream.cpp   (revision 18898)
+++ src/support/docstream.cpp   (working copy)
@@ -322,7 +322,7 @@
 
 }
 
-#if (!defined(HAVE_WCHAR_T) || SIZEOF_WCHAR_T != 4)  defined(__GNUC__)
+#if ! defined(USE_WCHAR_T)  defined(__GNUC__)
 // We get undefined references to these virtual methods. This looks like
 // a bug in gcc. The implementation here does not do anything useful, since
 // it is overriden in iconv_codecvt_facet.
Index: src/support/docstring.cpp
===
--- src/support/docstring.cpp   (revision 18898)
+++ src/support/docstring.cpp   (working copy)
@@ -217,7 +217,7 @@
 
 } // namespace lyx
 
-#if (!defined(HAVE_WCHAR_T) || SIZEOF_WCHAR_T != 4)  defined(__GNUC__)
+#if ! defined(USE_WCHAR_T)  defined(__GNUC__)
 
 // gcc does not have proper locale facets for lyx::char_type if
 // sizeof(wchar_t) == 2, so we have to implement them on our own.
Index: src/support/types.h
===
--- src/support/types.h (revision 18898)
+++ src/support/types.h (working copy)
@@ -23,7 +23,7 @@
 namespace lyx {
 
/// The type used to hold characters in paragraphs
-#if defined(HAVE_WCHAR_T)  SIZEOF_WCHAR_T == 4
+#ifdef USE_WCHAR_T
// Prefer this if possible because GNU libstdc++ has usable
// std::ctypewchar_t locale facets but not
// std::ctypeboost::uint32_t. gcc older than 3.4 is also missing
Index: configure.ac
===
--- configure.ac(revision 18898)
+++ configure.ac(working copy)
@@ -383,8 +383,18 @@
 #  define WANT_GETFILEATTRIBUTESEX_WRAPPER 1
 #endif
 
-#if defined(HAVE_WCHAR_T)  SIZEOF_WCHAR_T == 4
-#  define LIBC_WCTYPE_USES_UCS4
+/*
+ * the FreeBSD libc uses UCS4, but libstdc++ has no proper wchar_t
+ * support compiled in:
+ * http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html#3_9
+ * And we are not interested at all what libc
+ * does: What we need is a 32bit wide wchar_t, and a libstdc++ that
+ * has the needed wchar_t support and uses UCS4. Whether it
+ * implements this with the help of libc, or whether it has own code
+ * does not matter for us, because we don't use libc directly (Georg)
+*/
+#if defined(HAVE_WCHAR_T)  SIZEOF_WCHAR_T == 4  !defined(__FREEBSD__)   
!defined(__NetBSD__)
+#  define USE_WCHAR_T
 #endif
 
 #endif
Index: development/cmake/config.h.cmake
===
--- development/cmake/config.h.cmake(revision 18899)
+++ development/cmake/config.h.cmake(working copy)
@@ -171,7 +171,7 @@
  * implements this with the help of libc, or whether it has own code
  * does not matter for us, because we don't use libc directly (Georg)
 */
-#if defined(HAVE_WCHAR_T)  SIZEOF_WCHAR_T == 4  ! defined(__FREEBSD__)
+#if defined(HAVE_WCHAR_T)  SIZEOF_WCHAR_T == 4  !defined(__FREEBSD__)  
!defined(__NetBSD__)
 #  define USE_WCHAR_T
 #endif
 
Index: development/scons/SConstruct
===
--- development/scons/SConstruct(revision 18898)
+++ development/scons/SConstruct(working copy)
@@ -824,8 +824,8 @@
  * implements this with the help of libc, or whether it has own code
  * does not matter for us, because we don't use libc directly (Georg)
 */
-#if defined(HAVE_WCHAR_T)  SIZEOF_WCHAR_T == 4  ! defined(__FREEBSD__)
-#  define LIBC_WCTYPE_USES_UCS4
+#if defined(HAVE_WCHAR_T)  SIZEOF_WCHAR_T == 4  !defined(__FREEBSD__)  
!defined(__NetBSD__)
+#  define USE_WCHAR_T
 #endif
 
 #endif


Re: [PATCH] bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-06-26 Thread Peter Kümmel
Peter Kümmel wrote:
 Bo Peng wrote:
 According to http://www.netbsd.org/about/roadmap.html, this is also
 true for NetBSD, so I would also add  !defined(__NetBSD__) there.
 Are you sure about the name here? Not __NETBSD__?

 Bo

 
 Seems he is right:
 http://predef.sourceforge.net/preos.html#sec23
 
 And the patch.
 
 Peter
 

Is it correct that this line remains untouched?

#if SIZEOF_WCHAR_T != 4  defined(__GNUC__)  defined(__GNUC_MINOR__)  
__GNUC__ == 3  __GNUC_MINOR__  4



Re: [PATCH] bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-06-26 Thread Bo Peng

 Are you sure about the name here? Not __NETBSD__?



When I google, I see a lot of

defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__OpenBSD__)

so I guess we should use these forms. Also, has anyone checked open bsd?

Bo


Re: [PATCH] bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-06-26 Thread Bo Peng

On 6/26/07, Bo Peng [EMAIL PROTECTED] wrote:

  Are you sure about the name here? Not __NETBSD__?
 

When I google, I see a lot of

defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__OpenBSD__)


Of course I meant FreeBSD, OpenBSD and NetBSD.

Bo


Re: [PATCH] bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-06-26 Thread Jean-Marc Lasgouttes
 Peter == Peter Kümmel [EMAIL PROTECTED] writes:

Peter Is it correct that this line remains untouched?

Peter #if SIZEOF_WCHAR_T != 4  defined(__GNUC__) 
Peter defined(__GNUC_MINOR__)  __GNUC__ == 3  __GNUC_MINOR__  4

No, and I do not know how I missed it. I think it should be 

#if ! defined(USE_WCHAR_T)  defined(__GNUC__)  defined(__GNUC_MINOR__)  
__GNUC__ == 3  __GNUC_MINOR__  4

JMarc


Re: [PATCH] bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-06-26 Thread Enrico Forestieri
On Tue, Jun 26, 2007 at 02:19:47PM -0500, Bo Peng wrote:

 On 6/26/07, Bo Peng [EMAIL PROTECTED] wrote:
Are you sure about the name here? Not __NETBSD__?
   
 
  When I google, I see a lot of
 
  defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__OpenBSD__)
 
 Of course I meant FreeBSD, OpenBSD and NetBSD.

I don't know for the others. As regards NetBSD, I have an ancient
version and just checked the output of g++ -E -dM -xc++ /dev/null.
Looking at the URL provided by Peter, seems that you are right, though.

-- 
Enrico


Re: [PATCH] bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-06-26 Thread Georg Baum
Am Dienstag, 26. Juni 2007 14:17 schrieb Jean-Marc Lasgouttes:
> 
> http://bugzilla.lyx.org/show_bug.cgi?id=3537
> 
> This bug comes from the fact that FreeBSD (in it current incarnations
> at least) does not have proper support for wchar_t.
> 
> I did not rename LIBC_WCTYPE_USES_UCS4 to something more readable like
> USE_WCHAR_T. Should I?

I think so, since AFAIK LIBC_WCTYPE_USES_UCS4 would be wrong: From what I 
understand from the past discussions the FreeBSD libc uses UCS4, but 
libstdc++ has no proper wchar_t support compiled in. And we are not 
interested at all what libc does: What we need is a 32bit wide wchar_t, 
and a libstdc++ that has the needed wchar_t support and uses UCS4. Whether 
it implements this with the help of libc, or whether it has own code does 
not matter for us, because we don't use libc directly (we did at some 
point in time, but it turned out that it did not work).

> Koji, does the patch work for you?
> 
> Georg, does it look right to you?

Yes. But I think that a comment should be added in configure.ac why FreeBSD 
is excluded, probably pointing to the libstdc++ bug report (or the 
lyx-devel thread). Then it will be easy to check whether the FreeBSD 
exclusion can be removed or not if somebody stumbles over the test and 
wonders why it is there.


Georg


Re: [PATCH] bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-06-26 Thread José Matos
On Tuesday 26 June 2007 14:39:05 Georg Baum wrote:
> Yes. But I think that a comment should be added in configure.ac why FreeBSD
> is excluded, probably pointing to the libstdc++ bug report (or the
> lyx-devel thread). Then it will be easy to check whether the FreeBSD
> exclusion can be removed or not if somebody stumbles over the test and
> wonders why it is there.

  FWIW this is a bug fix that I would like to have even after RC2 and before 
1.5.0. If it works, of course. :-)

> Georg

-- 
José Abílio


Re: [PATCH] bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-06-26 Thread Bo Peng

If the patch works, similar changes should be done to cmake and scons.



The scons part is easy:

Index: development/scons/SConstruct
===
--- development/scons/SConstruct(revision 18892)
+++ development/scons/SConstruct(working copy)
@@ -814,7 +814,7 @@
#  define WANT_GETFILEATTRIBUTESEX_WRAPPER 1
#endif

-#if defined(HAVE_WCHAR_T) && SIZEOF_WCHAR_T == 4
+#if defined(HAVE_WCHAR_T) && SIZEOF_WCHAR_T == 4 && ! defined(__FREEBSD__)
#  define LIBC_WCTYPE_USES_UCS4
#endif


Re: [PATCH] bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-06-26 Thread Jean-Marc Lasgouttes
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes:

Georg> Yes. But I think that a comment should be added in configure.ac
Georg> why FreeBSD is excluded, probably pointing to the libstdc++ bug
Georg> report (or the lyx-devel thread). Then it will be easy to check
Georg> whether the FreeBSD exclusion can be removed or not if somebody
Georg> stumbles over the test and wonders why it is there.

That would be this (with shamelessly stolen text).

JMarc

Index: src/support/docstream.cpp
===
--- src/support/docstream.cpp	(révision 18889)
+++ src/support/docstream.cpp	(copie de travail)
@@ -322,7 +322,7 @@ odocstream & operator<<(odocstream & os,
 
 }
 
-#if (!defined(HAVE_WCHAR_T) || SIZEOF_WCHAR_T != 4) && defined(__GNUC__)
+#if ! defined(USE_WCHAR_T) && defined(__GNUC__)
 // We get undefined references to these virtual methods. This looks like
 // a bug in gcc. The implementation here does not do anything useful, since
 // it is overriden in iconv_codecvt_facet.
Index: src/support/docstring.cpp
===
--- src/support/docstring.cpp	(révision 18889)
+++ src/support/docstring.cpp	(copie de travail)
@@ -217,7 +217,7 @@ lyx::docstring & operator+=(lyx::docstri
 
 } // namespace lyx
 
-#if (!defined(HAVE_WCHAR_T) || SIZEOF_WCHAR_T != 4) && defined(__GNUC__)
+#if ! defined(USE_WCHAR_T) && defined(__GNUC__)
 
 // gcc does not have proper locale facets for lyx::char_type if
 // sizeof(wchar_t) == 2, so we have to implement them on our own.
Index: src/support/types.h
===
--- src/support/types.h	(révision 18889)
+++ src/support/types.h	(copie de travail)
@@ -23,7 +23,7 @@
 namespace lyx {
 
 	/// The type used to hold characters in paragraphs
-#if defined(HAVE_WCHAR_T) && SIZEOF_WCHAR_T == 4
+#ifdef USE_WCHAR_T
 	// Prefer this if possible because GNU libstdc++ has usable
 	// std::ctype locale facets but not
 	// std::ctype. gcc older than 3.4 is also missing
Index: configure.ac
===
--- configure.ac	(révision 18889)
+++ configure.ac	(copie de travail)
@@ -383,8 +383,18 @@ int mkstemp(char*);
 #  define WANT_GETFILEATTRIBUTESEX_WRAPPER 1
 #endif
 
-#if defined(HAVE_WCHAR_T) && SIZEOF_WCHAR_T == 4
-#  define LIBC_WCTYPE_USES_UCS4
+/*
+ * the FreeBSD libc uses UCS4, but libstdc++ has no proper wchar_t
+ * support compiled in:
+ * http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html#3_9
+ * And we are not interested at all what libc
+ * does: What we need is a 32bit wide wchar_t, and a libstdc++ that
+ * has the needed wchar_t support and uses UCS4. Whether it
+ * implements this with the help of libc, or whether it has own code
+ * does not matter for us, because we don't use libc directly (Georg)
+*/
+#if defined(HAVE_WCHAR_T) && SIZEOF_WCHAR_T == 4 && ! defined(__FREEBSD__)
+#  define USE_WCHAR_T
 #endif
 
 #endif


Re: [PATCH] bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-06-26 Thread Enrico Forestieri
On Tue, Jun 26, 2007 at 04:47:25PM +0200, Jean-Marc Lasgouttes wrote:

> +/*
> + * the FreeBSD libc uses UCS4, but libstdc++ has no proper wchar_t
> + * support compiled in:
> + * http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html#3_9
> + * And we are not interested at all what libc
> + * does: What we need is a 32bit wide wchar_t, and a libstdc++ that
> + * has the needed wchar_t support and uses UCS4. Whether it
> + * implements this with the help of libc, or whether it has own code
> + * does not matter for us, because we don't use libc directly (Georg)
> +*/
> +#if defined(HAVE_WCHAR_T) && SIZEOF_WCHAR_T == 4 && ! defined(__FREEBSD__)
> +#  define USE_WCHAR_T
>  #endif

According to http://www.netbsd.org/about/roadmap.html, this is also
true for NetBSD, so I would also add "&& !defined(__NetBSD__)" there.

-- 
Enrico


Re: [PATCH] bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-06-26 Thread Bo Peng

According to http://www.netbsd.org/about/roadmap.html, this is also
true for NetBSD, so I would also add "&& !defined(__NetBSD__)" there.


Are you sure about the name here? Not __NETBSD__?

Bo


Re: [PATCH] bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-06-26 Thread Peter Kümmel
Bo Peng wrote:
>> According to http://www.netbsd.org/about/roadmap.html, this is also
>> true for NetBSD, so I would also add "&& !defined(__NetBSD__)" there.
> 
> Are you sure about the name here? Not __NETBSD__?
> 
> Bo
> 

Seems he is right:
http://predef.sourceforge.net/preos.html#sec23

And the patch.

Peter
Index: src/support/docstream.cpp
===
--- src/support/docstream.cpp   (revision 18898)
+++ src/support/docstream.cpp   (working copy)
@@ -322,7 +322,7 @@
 
 }
 
-#if (!defined(HAVE_WCHAR_T) || SIZEOF_WCHAR_T != 4) && defined(__GNUC__)
+#if ! defined(USE_WCHAR_T) && defined(__GNUC__)
 // We get undefined references to these virtual methods. This looks like
 // a bug in gcc. The implementation here does not do anything useful, since
 // it is overriden in iconv_codecvt_facet.
Index: src/support/docstring.cpp
===
--- src/support/docstring.cpp   (revision 18898)
+++ src/support/docstring.cpp   (working copy)
@@ -217,7 +217,7 @@
 
 } // namespace lyx
 
-#if (!defined(HAVE_WCHAR_T) || SIZEOF_WCHAR_T != 4) && defined(__GNUC__)
+#if ! defined(USE_WCHAR_T) && defined(__GNUC__)
 
 // gcc does not have proper locale facets for lyx::char_type if
 // sizeof(wchar_t) == 2, so we have to implement them on our own.
Index: src/support/types.h
===
--- src/support/types.h (revision 18898)
+++ src/support/types.h (working copy)
@@ -23,7 +23,7 @@
 namespace lyx {
 
/// The type used to hold characters in paragraphs
-#if defined(HAVE_WCHAR_T) && SIZEOF_WCHAR_T == 4
+#ifdef USE_WCHAR_T
// Prefer this if possible because GNU libstdc++ has usable
// std::ctype locale facets but not
// std::ctype. gcc older than 3.4 is also missing
Index: configure.ac
===
--- configure.ac(revision 18898)
+++ configure.ac(working copy)
@@ -383,8 +383,18 @@
 #  define WANT_GETFILEATTRIBUTESEX_WRAPPER 1
 #endif
 
-#if defined(HAVE_WCHAR_T) && SIZEOF_WCHAR_T == 4
-#  define LIBC_WCTYPE_USES_UCS4
+/*
+ * the FreeBSD libc uses UCS4, but libstdc++ has no proper wchar_t
+ * support compiled in:
+ * http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html#3_9
+ * And we are not interested at all what libc
+ * does: What we need is a 32bit wide wchar_t, and a libstdc++ that
+ * has the needed wchar_t support and uses UCS4. Whether it
+ * implements this with the help of libc, or whether it has own code
+ * does not matter for us, because we don't use libc directly (Georg)
+*/
+#if defined(HAVE_WCHAR_T) && SIZEOF_WCHAR_T == 4 && !defined(__FREEBSD__)  && 
!defined(__NetBSD__)
+#  define USE_WCHAR_T
 #endif
 
 #endif
Index: development/cmake/config.h.cmake
===
--- development/cmake/config.h.cmake(revision 18899)
+++ development/cmake/config.h.cmake(working copy)
@@ -171,7 +171,7 @@
  * implements this with the help of libc, or whether it has own code
  * does not matter for us, because we don't use libc directly (Georg)
 */
-#if defined(HAVE_WCHAR_T) && SIZEOF_WCHAR_T == 4 && ! defined(__FREEBSD__)
+#if defined(HAVE_WCHAR_T) && SIZEOF_WCHAR_T == 4 && !defined(__FREEBSD__) && 
!defined(__NetBSD__)
 #  define USE_WCHAR_T
 #endif
 
Index: development/scons/SConstruct
===
--- development/scons/SConstruct(revision 18898)
+++ development/scons/SConstruct(working copy)
@@ -824,8 +824,8 @@
  * implements this with the help of libc, or whether it has own code
  * does not matter for us, because we don't use libc directly (Georg)
 */
-#if defined(HAVE_WCHAR_T) && SIZEOF_WCHAR_T == 4 && ! defined(__FREEBSD__)
-#  define LIBC_WCTYPE_USES_UCS4
+#if defined(HAVE_WCHAR_T) && SIZEOF_WCHAR_T == 4 && !defined(__FREEBSD__) && 
!defined(__NetBSD__)
+#  define USE_WCHAR_T
 #endif
 
 #endif


Re: [PATCH] bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-06-26 Thread Peter Kümmel
Peter Kümmel wrote:
> Bo Peng wrote:
>>> According to http://www.netbsd.org/about/roadmap.html, this is also
>>> true for NetBSD, so I would also add "&& !defined(__NetBSD__)" there.
>> Are you sure about the name here? Not __NETBSD__?
>>
>> Bo
>>
> 
> Seems he is right:
> http://predef.sourceforge.net/preos.html#sec23
> 
> And the patch.
> 
> Peter
> 

Is it correct that this line remains untouched?

#if SIZEOF_WCHAR_T != 4 && defined(__GNUC__) && defined(__GNUC_MINOR__) && 
__GNUC__ == 3 && __GNUC_MINOR__ < 4



Re: [PATCH] bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-06-26 Thread Bo Peng

> Are you sure about the name here? Not __NETBSD__?
>


When I google, I see a lot of

defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__OpenBSD__)

so I guess we should use these forms. Also, has anyone checked open bsd?

Bo


Re: [PATCH] bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-06-26 Thread Bo Peng

On 6/26/07, Bo Peng <[EMAIL PROTECTED]> wrote:

> > Are you sure about the name here? Not __NETBSD__?
> >

When I google, I see a lot of

defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__OpenBSD__)


Of course I meant FreeBSD, OpenBSD and NetBSD.

Bo


Re: [PATCH] bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-06-26 Thread Jean-Marc Lasgouttes
> "Peter" == Peter Kümmel <[EMAIL PROTECTED]> writes:

Peter> Is it correct that this line remains untouched?

Peter> #if SIZEOF_WCHAR_T != 4 && defined(__GNUC__) &&
Peter> defined(__GNUC_MINOR__) && __GNUC__ == 3 && __GNUC_MINOR__ < 4

No, and I do not know how I missed it. I think it should be 

#if ! defined(USE_WCHAR_T) && defined(__GNUC__) && defined(__GNUC_MINOR__) && 
__GNUC__ == 3 && __GNUC_MINOR__ < 4

JMarc


Re: [PATCH] bug 3537: lyx-1.5.0beta2 dumps core on freebsd-6.2 when it tries to handle strings of filenames etc.

2007-06-26 Thread Enrico Forestieri
On Tue, Jun 26, 2007 at 02:19:47PM -0500, Bo Peng wrote:

> On 6/26/07, Bo Peng <[EMAIL PROTECTED]> wrote:
> > > > Are you sure about the name here? Not __NETBSD__?
> > > >
> >
> > When I google, I see a lot of
> >
> > defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__OpenBSD__)
> 
> Of course I meant FreeBSD, OpenBSD and NetBSD.

I don't know for the others. As regards NetBSD, I have an ancient
version and just checked the output of "g++ -E -dM -xc++ /dev/null".
Looking at the URL provided by Peter, seems that you are right, though.

-- 
Enrico