summaryrefslogtreecommitdiff
path: root/editors/openoffice.org-2-devel/files/patch-sal+osl+unx+nlsupport.c
diff options
context:
space:
mode:
authorMartin Blapp <mbr@FreeBSD.org>2002-03-02 19:15:00 +0000
committerMartin Blapp <mbr@FreeBSD.org>2002-03-02 19:15:00 +0000
commitf7dbd92f23bcad2a3cd986ccb5ee4c987a3549c8 (patch)
treee9d274bf60ce39987914d448506953fc2aad3888 /editors/openoffice.org-2-devel/files/patch-sal+osl+unx+nlsupport.c
parentUpgrade to the 25-Feb-2002 GCC 3.1 development snapshot. (diff)
Add patches merged from NetBSD and from other sources
Notes
Notes: svn path=/head/; revision=55408
Diffstat (limited to 'editors/openoffice.org-2-devel/files/patch-sal+osl+unx+nlsupport.c')
-rw-r--r--editors/openoffice.org-2-devel/files/patch-sal+osl+unx+nlsupport.c90
1 files changed, 83 insertions, 7 deletions
diff --git a/editors/openoffice.org-2-devel/files/patch-sal+osl+unx+nlsupport.c b/editors/openoffice.org-2-devel/files/patch-sal+osl+unx+nlsupport.c
index cd0c56d2c984..221973d22290 100644
--- a/editors/openoffice.org-2-devel/files/patch-sal+osl+unx+nlsupport.c
+++ b/editors/openoffice.org-2-devel/files/patch-sal+osl+unx+nlsupport.c
@@ -1,29 +1,105 @@
---- ../sal/osl/unx/nlsupport.c Wed Feb 27 00:54:01 2002
-+++ ../sal/osl/unx/nlsupport.c Wed Feb 27 15:00:58 2002
+--- ../sal/osl/unx/nlsupport.c.orig Mon Nov 12 21:21:31 2001
++++ ../sal/osl/unx/nlsupport.c
@@ -63,7 +63,7 @@
#include <osl/diagnose.h>
#include <osl/process.h>
-#if defined(LINUX) || defined(SOLARIS)
-+#if defined(LINUX) || defined(SOLARIS) || defined(FREEBSD)
++#if defined(LINUX) || defined(SOLARIS) || defined(NETBSD) || defined(FREEBSD)
#include <pthread.h>
#include <locale.h>
#include <langinfo.h>
-@@ -841,7 +841,7 @@
+@@ -242,7 +242,7 @@
+ return NULL;
+ }
+
+-#if defined(LINUX) || defined(SOLARIS)
++#if defined(LINUX) || defined(SOLARIS) || defined(NETBSD) || defined(FREEBSD)
+
+ /*
+ * This implementation of osl_getTextEncodingFromLocale maps
+@@ -296,7 +296,7 @@
+ /* XXX MS-874 is an extension to tis620, so this is not
+ * really equivalent */
+
+-#elif defined(LINUX)
++#elif defined(LINUX) || defined(NETBSD) || defined(FREEBSD)
+
+ const _pair _nl_language_list[] = {
+ { "ANSI_X3.110-1983", RTL_TEXTENCODING_DONTKNOW }, /* ISO-IR-99 NAPLPS */
+@@ -477,7 +477,7 @@
+ { "WIN-SAMI-2", RTL_TEXTENCODING_DONTKNOW } /* WS2 */
+ };
+
+-#endif /* ifdef LINUX */
++#endif /* ifdef LINUX || NETBSD || FREEBSD */
+
+ static pthread_mutex_t aLocalMutex = PTHREAD_MUTEX_INITIALIZER;
+
+@@ -516,7 +516,13 @@
+ }
+
+ /* get the charset as indicated by the LC_CTYPE locale */
++#if defined(NETBSD) || defined(FREEBSD)
++#if !defined(CODESET)
++ codeset = NULL;
++#else
+ codeset = nl_langinfo( CODESET );
++#endif
++#endif
+
+ if ( codeset != NULL )
+ {
+@@ -595,7 +599,7 @@
+ return ret;
+ }
+
+-#elif defined(MACOSX) /* ifdef LINUX || SOLARIS */
++#elif defined(MACOSX) /* ifdef LINUX || SOLARIS || NETBSD || FREEBSD */
+
+ /*
+ * FIXME: the MacOS X implemetation is missing
+@@ -628,7 +632,7 @@
+ return 0;
+ }
+
+-#else /* ifdef LINUX || SOLARIS || MACOSX */
++#else /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */
+
+ /*
+ * This implementation of osl_getTextEncodingFromLocale maps
+@@ -829,7 +833,7 @@
+ snprintf(env_buf, sizeof(env_buf), "LC_ALL=%s", locale_buf);
+ env_buf[sizeof(env_buf)] = '\0';
+ putenv(env_buf);
+-#elif defined( FREEBSD ) || defined( NETBSD )
++#elif defined( FREEBSD )
+ setenv( "LC_ALL", locale_buf, 1);
+ #else
+ setenv( "LC_ALL", locale_buf );
+@@ -841,7 +845,7 @@
snprintf(env_buf, sizeof(env_buf), "LC_CTYPE=%s", locale_buf);
env_buf[sizeof(env_buf)] = '\0';
putenv(env_buf);
-#elif defined( FREEBAD ) || defined( NETBSD )
-+#elif defined( FREEBSD ) || defined( NETBSD )
++#elif defined( FREEBSD )
setenv("LC_CTYPE", locale_buf, 1 );
#else
setenv( "LC_CTYPE", locale_buf );
-@@ -853,7 +853,7 @@
+@@ -853,7 +857,7 @@
snprintf(env_buf, sizeof(env_buf), "LANG=%s", locale_buf);
env_buf[sizeof(env_buf)] = '\0';
putenv(env_buf);
-#elif defined( FREEBAD ) || defined( NETBSD )
-+#elif defined( FREEBSD ) || defined( NETBSD )
++#elif defined( FREEBSD )
setenv("LC_CTYPE", locale_buf, 1 );
#else
setenv( "LANG", locale_buf );
+@@ -864,6 +868,6 @@
+ return 0;
+ }
+
+-#endif /* ifdef LINUX || SOLARIS || MACOSX*/
++#endif /* ifdef LINUX || SOLARIS || MACOSX || NETBSD || FREEBSD */
+
+