summaryrefslogtreecommitdiff
path: root/editors/openoffice.org-2-RC
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-RC
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-RC')
-rw-r--r--editors/openoffice.org-2-RC/files/patch-bridges+prj+build.lst10
-rw-r--r--editors/openoffice.org-2-RC/files/patch-bridges::prj::build.lst10
-rw-r--r--editors/openoffice.org-2-RC/files/patch-chaos::util::makefile.mk11
-rw-r--r--editors/openoffice.org-2-RC/files/patch-sal+osl+unx+nlsupport.c90
-rw-r--r--editors/openoffice.org-2-RC/files/patch-sal+osl+unx+system.c127
-rw-r--r--editors/openoffice.org-2-RC/files/patch-sal::osl::unx::file.c73
-rw-r--r--editors/openoffice.org-2-RC/files/patch-sal::osl::unx::nlsupport.c90
-rw-r--r--editors/openoffice.org-2-RC/files/patch-sal::osl::unx::system.c127
-rw-r--r--editors/openoffice.org-2-RC/files/patch-setup2+script+setupserver11
-rw-r--r--editors/openoffice.org-2-RC/files/patch-setup2+source+custom+jvmsetup+loader+jvmsetup.sh11
-rw-r--r--editors/openoffice.org-2-RC/files/patch-setup2::script::setupserver11
-rw-r--r--editors/openoffice.org-2-RC/files/patch-setup2::source::custom::jvmsetup::loader::jvmsetup.sh11
12 files changed, 568 insertions, 14 deletions
diff --git a/editors/openoffice.org-2-RC/files/patch-bridges+prj+build.lst b/editors/openoffice.org-2-RC/files/patch-bridges+prj+build.lst
new file mode 100644
index 000000000000..3d0f5ac7cc9b
--- /dev/null
+++ b/editors/openoffice.org-2-RC/files/patch-bridges+prj+build.lst
@@ -0,0 +1,10 @@
+--- ../bridges/prj/build.lst Sat Mar 2 18:13:42 2002
++++ ../bridges/prj/build.lst Sat Mar 2 18:13:46 2002
+@@ -7,7 +7,6 @@
+ br bridges\source\remote\context nmake - all br_rcon br_unotypes NULL
+ br bridges\source\cpp_uno\msvc_win32_intel nmake - w br_msci br_unotypes NULL
+ br bridges\source\cpp_uno\gcc2_linux_intel nmake - u br_gccli br_unotypes NULL
+-br bridges\source\cpp_uno\gcc2_freebsd_intel nmake - u br_gccfi br_unotypes NULL
+ br bridges\source\cpp_uno\gcc2_linux_powerpc nmake - u br_gcclp br_unotypes NULL
+ br bridges\source\cpp_uno\gcc2_macosx_powerpc nmake - u br_gccmacoxp br_unotypes NULL
+ br bridges\source\cpp_uno\cc50_solaris_sparc nmake - u br_cc50sols br_unotypes NULL
diff --git a/editors/openoffice.org-2-RC/files/patch-bridges::prj::build.lst b/editors/openoffice.org-2-RC/files/patch-bridges::prj::build.lst
new file mode 100644
index 000000000000..3d0f5ac7cc9b
--- /dev/null
+++ b/editors/openoffice.org-2-RC/files/patch-bridges::prj::build.lst
@@ -0,0 +1,10 @@
+--- ../bridges/prj/build.lst Sat Mar 2 18:13:42 2002
++++ ../bridges/prj/build.lst Sat Mar 2 18:13:46 2002
+@@ -7,7 +7,6 @@
+ br bridges\source\remote\context nmake - all br_rcon br_unotypes NULL
+ br bridges\source\cpp_uno\msvc_win32_intel nmake - w br_msci br_unotypes NULL
+ br bridges\source\cpp_uno\gcc2_linux_intel nmake - u br_gccli br_unotypes NULL
+-br bridges\source\cpp_uno\gcc2_freebsd_intel nmake - u br_gccfi br_unotypes NULL
+ br bridges\source\cpp_uno\gcc2_linux_powerpc nmake - u br_gcclp br_unotypes NULL
+ br bridges\source\cpp_uno\gcc2_macosx_powerpc nmake - u br_gccmacoxp br_unotypes NULL
+ br bridges\source\cpp_uno\cc50_solaris_sparc nmake - u br_cc50sols br_unotypes NULL
diff --git a/editors/openoffice.org-2-RC/files/patch-chaos::util::makefile.mk b/editors/openoffice.org-2-RC/files/patch-chaos::util::makefile.mk
new file mode 100644
index 000000000000..77dcd12cd410
--- /dev/null
+++ b/editors/openoffice.org-2-RC/files/patch-chaos::util::makefile.mk
@@ -0,0 +1,11 @@
+--- ../chaos/util/makefile.mk.orig Sat Mar 2 18:09:33 2002
++++ ../chaos/util/makefile.mk Sat Mar 2 18:09:18 2002
+@@ -100,7 +100,7 @@
+
+ SHL1TARGET= cnt$(UPD)$(DLLPOSTFIX)
+ SHL1IMPLIB= i$(TARGET)
+-.IF "$(OS)"=="MACOSX"
++.IF "$(OS)"=="MACOSX" || "$(OS)"=="FREEBSD"
+ #SHL1VERSIONMAP= exports.$(DLLPOSTFIX).map
+ .ELSE
+ SHL1VERSIONMAP= exports.map
diff --git a/editors/openoffice.org-2-RC/files/patch-sal+osl+unx+nlsupport.c b/editors/openoffice.org-2-RC/files/patch-sal+osl+unx+nlsupport.c
index cd0c56d2c984..221973d22290 100644
--- a/editors/openoffice.org-2-RC/files/patch-sal+osl+unx+nlsupport.c
+++ b/editors/openoffice.org-2-RC/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 */
+
+
diff --git a/editors/openoffice.org-2-RC/files/patch-sal+osl+unx+system.c b/editors/openoffice.org-2-RC/files/patch-sal+osl+unx+system.c
new file mode 100644
index 000000000000..b0b93119f983
--- /dev/null
+++ b/editors/openoffice.org-2-RC/files/patch-sal+osl+unx+system.c
@@ -0,0 +1,127 @@
+--- ../sal/osl/unx/system.c.orig Wed Feb 28 13:08:45 2001
++++ ../sal/osl/unx/system.c
+@@ -126,6 +126,73 @@
+ return res;
+ }
+
++int getpwuid_r(uid_t uid, struct passwd *pwd, char *buffer,
++ size_t buflen, struct passwd **result)
++{
++ struct passwd* res;
++
++ pthread_mutex_lock(&getrtl_mutex);
++
++ if ( res = getpwuid(uid) )
++ {
++ size_t pw_name, pw_passwd, pw_class, pw_gecos, pw_dir, pw_shell;
++
++ pw_name = strlen(res->pw_name)+1;
++ pw_passwd = strlen(res->pw_passwd)+1;
++ pw_class = strlen(res->pw_class)+1;
++ pw_gecos = strlen(res->pw_gecos)+1;
++ pw_dir = strlen(res->pw_dir)+1;
++ pw_shell = strlen(res->pw_shell)+1;
++
++ if (pw_name+pw_passwd+pw_class+pw_gecos
++ +pw_dir+pw_shell < buflen)
++ {
++ memcpy(pwd, res, sizeof(struct passwd));
++
++ strncpy(buffer, res->pw_name, pw_name);
++ pwd->pw_name = buffer;
++ buffer += pw_name;
++
++ strncpy(buffer, res->pw_passwd, pw_passwd);
++ pwd->pw_passwd = buffer;
++ buffer += pw_passwd;
++
++ strncpy(buffer, res->pw_class, pw_class);
++ pwd->pw_class = buffer;
++ buffer += pw_class;
++
++ strncpy(buffer, res->pw_gecos, pw_gecos);
++ pwd->pw_gecos = buffer;
++ buffer += pw_gecos;
++
++ strncpy(buffer, res->pw_dir, pw_dir);
++ pwd->pw_dir = buffer;
++ buffer += pw_dir;
++
++ strncpy(buffer, res->pw_shell, pw_shell);
++ pwd->pw_shell = buffer;
++ buffer += pw_shell;
++
++ *result = pwd ;
++ res = 0 ;
++
++ } else {
++
++ res = ENOMEM ;
++
++ }
++
++ } else {
++
++ res = errno ;
++
++ }
++
++ pthread_mutex_unlock(&getrtl_mutex);
++
++ return res;
++}
++
+ struct tm *localtime_r(const time_t *timep, struct tm *buffer)
+ {
+ struct tm* res;
+@@ -449,3 +516,50 @@
+ }
+ #endif
+
++#if defined(NETBSD) || defined(FREEBSD)
++char *fcvt(double value, int ndigit, int *decpt, int *sign)
++{
++ static char ret[256];
++ char buf[256],zahl[256],format[256]="%";
++ char *v1,*v2;
++
++ if (value==0.0) value=1e-30;
++
++ if (value<0.0) *sign=1; else *sign=0;
++
++ if (value<1.0)
++ {
++ *decpt=(int)log10(value);
++ value*=pow(10.0,1-*decpt);
++ ndigit+=*decpt-1;
++ if (ndigit<0) ndigit=0;
++ }
++ else
++ {
++ *decpt=(int)log10(value)+1;
++ }
++
++ sprintf(zahl,"%d",ndigit);
++ strcat(format,zahl);
++ strcat(format,".");
++ strcat(format,zahl);
++ strcat(format,"f");
++
++ sprintf(buf,format,value);
++
++ if (ndigit!=0)
++ {
++ v1=strtok(buf,".");
++ v2=strtok(NULL,".");
++ strcpy(ret,v1);
++ strcat(ret,v2);
++ }
++ else
++ {
++ strcpy(ret,buf);
++ }
++
++ return(ret);
++}
++
++#endif
diff --git a/editors/openoffice.org-2-RC/files/patch-sal::osl::unx::file.c b/editors/openoffice.org-2-RC/files/patch-sal::osl::unx::file.c
new file mode 100644
index 000000000000..ade5f14b7946
--- /dev/null
+++ b/editors/openoffice.org-2-RC/files/patch-sal::osl::unx::file.c
@@ -0,0 +1,73 @@
+--- ../sal/osl/unx/file.c.orig Thu Oct 4 15:09:21 2001
++++ ../sal/osl/unx/file.c
+@@ -123,11 +123,16 @@
+ #include <ctype.h>
+ static const sal_Char* MOUNTTAB="/etc/mtab";
+
+-#elif defined(NETBSD)
++#elif defined(NETBSD) || defined(FREEBSD)
++#include <sys/param.h>
++#include <sys/ucred.h>
+ #include <sys/mount.h>
+ #include <ufs/ufs/quota.h>
+ #include <ctype.h>
+-static const sal_Char* MOUNTTAB="/etc/mtab";
++#define HAVE_STATFS_H
++/* No mounting table on *BSD
++ * This information is stored only in the kernel. */
++/* static const sal_Char* MOUNTTAB="/etc/mtab"; */
+
+ #elif defined(IRIX)
+ #include <mntent.h>
+@@ -137,7 +142,7 @@
+ #include <ctype.h>
+ static const sal_Char* MOUNTTAB="/etc/mtab";
+
+-#elif defined(MACOSX) || defined(FREEBSD)
++#elif defined(MACOSX)
+ #include <ufs/ufs/quota.h>
+ #include <ctype.h>
+ static const sal_Char* MOUNTTAB="/etc/mtab";
+@@ -4224,10 +4229,20 @@
+ mntfile = fopen(MOUNTTAB,"r");
+ #endif /* SOLARIS */
+
++#if defined(NETBSD) || defined(FREEBSD)
++ struct statfs *mntbufp;
++ int mntentries,i;
++ mntentries = getmntinfo(&mntbufp,MNT_WAIT);
+
+ buffer[0] = '\0';
+
++ if(mntentries == 0)
++#else
++
++ buffer[0] = '\0';
++
+ if ( mntfile == 0 )
++#endif
+ {
+ nRet=errno;
+ #ifdef DEBUG_OSL_FILE
+@@ -4286,7 +4301,21 @@
+ }
+ #endif /* SOLARIS */
+
++#if defined(NETBSD) || defined(FREEBSD)
++ i=0;
++ while ( i < mntentries )
++ {
++ if ( strcmp(mntbufp[i].f_mntonname,buffer) == 0 )
++ {
++ *bMountPoint=sal_True;
++ return osl_File_E_None;
++ }
++ i++;
++ }
++#endif
++#if ! ( defined(NETBSD) || defined(FREEBSD) )
+ fclose(mntfile);
++#endif
+ *bMountPoint=sal_False;
+ return osl_File_E_None;
+ }
diff --git a/editors/openoffice.org-2-RC/files/patch-sal::osl::unx::nlsupport.c b/editors/openoffice.org-2-RC/files/patch-sal::osl::unx::nlsupport.c
index cd0c56d2c984..221973d22290 100644
--- a/editors/openoffice.org-2-RC/files/patch-sal::osl::unx::nlsupport.c
+++ b/editors/openoffice.org-2-RC/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 */
+
+
diff --git a/editors/openoffice.org-2-RC/files/patch-sal::osl::unx::system.c b/editors/openoffice.org-2-RC/files/patch-sal::osl::unx::system.c
new file mode 100644
index 000000000000..b0b93119f983
--- /dev/null
+++ b/editors/openoffice.org-2-RC/files/patch-sal::osl::unx::system.c
@@ -0,0 +1,127 @@
+--- ../sal/osl/unx/system.c.orig Wed Feb 28 13:08:45 2001
++++ ../sal/osl/unx/system.c
+@@ -126,6 +126,73 @@
+ return res;
+ }
+
++int getpwuid_r(uid_t uid, struct passwd *pwd, char *buffer,
++ size_t buflen, struct passwd **result)
++{
++ struct passwd* res;
++
++ pthread_mutex_lock(&getrtl_mutex);
++
++ if ( res = getpwuid(uid) )
++ {
++ size_t pw_name, pw_passwd, pw_class, pw_gecos, pw_dir, pw_shell;
++
++ pw_name = strlen(res->pw_name)+1;
++ pw_passwd = strlen(res->pw_passwd)+1;
++ pw_class = strlen(res->pw_class)+1;
++ pw_gecos = strlen(res->pw_gecos)+1;
++ pw_dir = strlen(res->pw_dir)+1;
++ pw_shell = strlen(res->pw_shell)+1;
++
++ if (pw_name+pw_passwd+pw_class+pw_gecos
++ +pw_dir+pw_shell < buflen)
++ {
++ memcpy(pwd, res, sizeof(struct passwd));
++
++ strncpy(buffer, res->pw_name, pw_name);
++ pwd->pw_name = buffer;
++ buffer += pw_name;
++
++ strncpy(buffer, res->pw_passwd, pw_passwd);
++ pwd->pw_passwd = buffer;
++ buffer += pw_passwd;
++
++ strncpy(buffer, res->pw_class, pw_class);
++ pwd->pw_class = buffer;
++ buffer += pw_class;
++
++ strncpy(buffer, res->pw_gecos, pw_gecos);
++ pwd->pw_gecos = buffer;
++ buffer += pw_gecos;
++
++ strncpy(buffer, res->pw_dir, pw_dir);
++ pwd->pw_dir = buffer;
++ buffer += pw_dir;
++
++ strncpy(buffer, res->pw_shell, pw_shell);
++ pwd->pw_shell = buffer;
++ buffer += pw_shell;
++
++ *result = pwd ;
++ res = 0 ;
++
++ } else {
++
++ res = ENOMEM ;
++
++ }
++
++ } else {
++
++ res = errno ;
++
++ }
++
++ pthread_mutex_unlock(&getrtl_mutex);
++
++ return res;
++}
++
+ struct tm *localtime_r(const time_t *timep, struct tm *buffer)
+ {
+ struct tm* res;
+@@ -449,3 +516,50 @@
+ }
+ #endif
+
++#if defined(NETBSD) || defined(FREEBSD)
++char *fcvt(double value, int ndigit, int *decpt, int *sign)
++{
++ static char ret[256];
++ char buf[256],zahl[256],format[256]="%";
++ char *v1,*v2;
++
++ if (value==0.0) value=1e-30;
++
++ if (value<0.0) *sign=1; else *sign=0;
++
++ if (value<1.0)
++ {
++ *decpt=(int)log10(value);
++ value*=pow(10.0,1-*decpt);
++ ndigit+=*decpt-1;
++ if (ndigit<0) ndigit=0;
++ }
++ else
++ {
++ *decpt=(int)log10(value)+1;
++ }
++
++ sprintf(zahl,"%d",ndigit);
++ strcat(format,zahl);
++ strcat(format,".");
++ strcat(format,zahl);
++ strcat(format,"f");
++
++ sprintf(buf,format,value);
++
++ if (ndigit!=0)
++ {
++ v1=strtok(buf,".");
++ v2=strtok(NULL,".");
++ strcpy(ret,v1);
++ strcat(ret,v2);
++ }
++ else
++ {
++ strcpy(ret,buf);
++ }
++
++ return(ret);
++}
++
++#endif
diff --git a/editors/openoffice.org-2-RC/files/patch-setup2+script+setupserver b/editors/openoffice.org-2-RC/files/patch-setup2+script+setupserver
new file mode 100644
index 000000000000..07f3c3f8b23e
--- /dev/null
+++ b/editors/openoffice.org-2-RC/files/patch-setup2+script+setupserver
@@ -0,0 +1,11 @@
+--- ../setup2/script/setupserver.orig Sat Mar 2 17:57:36 2002
++++ ../setup2/script/setupserver Sat Mar 2 17:58:43 2002
+@@ -234,6 +234,8 @@
+ sd_platform=`uname -s`
+ case $sd_platform in
+ SCO_SV) test=/bin/test ;;
++ NetBSD) test=/bin/test ;;
++ FreeBSD) test=/bin/test ;;
+ *) test=/usr/bin/test ;;
+ esac
+ sd_cwd="`pwd`"
diff --git a/editors/openoffice.org-2-RC/files/patch-setup2+source+custom+jvmsetup+loader+jvmsetup.sh b/editors/openoffice.org-2-RC/files/patch-setup2+source+custom+jvmsetup+loader+jvmsetup.sh
new file mode 100644
index 000000000000..d98230af5a69
--- /dev/null
+++ b/editors/openoffice.org-2-RC/files/patch-setup2+source+custom+jvmsetup+loader+jvmsetup.sh
@@ -0,0 +1,11 @@
+--- ../setup2/source/custom/jvmsetup/loader/jvmsetup.sh Sat Mar 2 18:01:19 2002
++++ ../setup2/source/custom/jvmsetup/loader/jvmsetup.sh Sat Mar 2 18:02:12 2002
+@@ -65,6 +65,8 @@
+ sd_platform=`uname -s`
+ case $sd_platform in
+ SCO_SV) test=/bin/test ;;
++ NetBSD) test=/bin/test ;;
++ FreeBSD) test=/bin/test ;;
+ *) test=/usr/bin/test ;;
+ esac
+
diff --git a/editors/openoffice.org-2-RC/files/patch-setup2::script::setupserver b/editors/openoffice.org-2-RC/files/patch-setup2::script::setupserver
new file mode 100644
index 000000000000..07f3c3f8b23e
--- /dev/null
+++ b/editors/openoffice.org-2-RC/files/patch-setup2::script::setupserver
@@ -0,0 +1,11 @@
+--- ../setup2/script/setupserver.orig Sat Mar 2 17:57:36 2002
++++ ../setup2/script/setupserver Sat Mar 2 17:58:43 2002
+@@ -234,6 +234,8 @@
+ sd_platform=`uname -s`
+ case $sd_platform in
+ SCO_SV) test=/bin/test ;;
++ NetBSD) test=/bin/test ;;
++ FreeBSD) test=/bin/test ;;
+ *) test=/usr/bin/test ;;
+ esac
+ sd_cwd="`pwd`"
diff --git a/editors/openoffice.org-2-RC/files/patch-setup2::source::custom::jvmsetup::loader::jvmsetup.sh b/editors/openoffice.org-2-RC/files/patch-setup2::source::custom::jvmsetup::loader::jvmsetup.sh
new file mode 100644
index 000000000000..d98230af5a69
--- /dev/null
+++ b/editors/openoffice.org-2-RC/files/patch-setup2::source::custom::jvmsetup::loader::jvmsetup.sh
@@ -0,0 +1,11 @@
+--- ../setup2/source/custom/jvmsetup/loader/jvmsetup.sh Sat Mar 2 18:01:19 2002
++++ ../setup2/source/custom/jvmsetup/loader/jvmsetup.sh Sat Mar 2 18:02:12 2002
+@@ -65,6 +65,8 @@
+ sd_platform=`uname -s`
+ case $sd_platform in
+ SCO_SV) test=/bin/test ;;
++ NetBSD) test=/bin/test ;;
++ FreeBSD) test=/bin/test ;;
+ *) test=/usr/bin/test ;;
+ esac
+