Author: jberry
Date: Thu May 26 17:10:16 2005
New Revision: 178715

URL: http://svn.apache.org/viewcvs?rev=178715&view=rev
Log:
Add some more replacement routines to library for Iconv on FreeBSD

Added:
    xerces/c/branches/jberry/3.0-unstable/lib/iswspace.c
    xerces/c/branches/jberry/3.0-unstable/lib/iswspace.h
    xerces/c/branches/jberry/3.0-unstable/lib/towlower.c
    xerces/c/branches/jberry/3.0-unstable/lib/towlower.h
    xerces/c/branches/jberry/3.0-unstable/lib/towupper.c
    xerces/c/branches/jberry/3.0-unstable/lib/towupper.h
Modified:
    xerces/c/branches/jberry/3.0-unstable/config.h
    xerces/c/branches/jberry/3.0-unstable/config.h.in
    xerces/c/branches/jberry/3.0-unstable/configure
    xerces/c/branches/jberry/3.0-unstable/configure.ac
    xerces/c/branches/jberry/3.0-unstable/lib/Makefile.in
    xerces/c/branches/jberry/3.0-unstable/lib/stricmp.c
    xerces/c/branches/jberry/3.0-unstable/lib/stricmp.h
    xerces/c/branches/jberry/3.0-unstable/lib/strnicmp.c
    xerces/c/branches/jberry/3.0-unstable/lib/strnicmp.h
    
xerces/c/branches/jberry/3.0-unstable/src/xercesc/util/Transcoders/Iconv/IconvTransService.cpp

Modified: xerces/c/branches/jberry/3.0-unstable/config.h
URL: 
http://svn.apache.org/viewcvs/xerces/c/branches/jberry/3.0-unstable/config.h?rev=178715&r1=178714&r2=178715&view=diff
==============================================================================
--- xerces/c/branches/jberry/3.0-unstable/config.h (original)
+++ xerces/c/branches/jberry/3.0-unstable/config.h Thu May 26 17:10:16 2005
@@ -43,6 +43,9 @@
 /* Define to 1 if you have the <inttypes.h> header file. */
 #define HAVE_INTTYPES_H 1
 
+/* Define to 1 if you have the `iswspace' function. */
+#define HAVE_ISWSPACE 1
+
 /* Define to 1 if you have the <langinfo.h> header file. */
 #define HAVE_LANGINFO_H 1
 

Modified: xerces/c/branches/jberry/3.0-unstable/config.h.in
URL: 
http://svn.apache.org/viewcvs/xerces/c/branches/jberry/3.0-unstable/config.h.in?rev=178715&r1=178714&r2=178715&view=diff
==============================================================================
--- xerces/c/branches/jberry/3.0-unstable/config.h.in (original)
+++ xerces/c/branches/jberry/3.0-unstable/config.h.in Thu May 26 17:10:16 2005
@@ -42,6 +42,9 @@
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
+/* Define to 1 if you have the `iswspace' function. */
+#undef HAVE_ISWSPACE
+
 /* Define to 1 if you have the <langinfo.h> header file. */
 #undef HAVE_LANGINFO_H
 

Modified: xerces/c/branches/jberry/3.0-unstable/configure
URL: 
http://svn.apache.org/viewcvs/xerces/c/branches/jberry/3.0-unstable/configure?rev=178715&r1=178714&r2=178715&view=diff
==============================================================================
--- xerces/c/branches/jberry/3.0-unstable/configure (original)
+++ xerces/c/branches/jberry/3.0-unstable/configure Thu May 26 17:10:16 2005
@@ -23472,7 +23472,10 @@
 #
 
 
-for ac_func in stricmp strnicmp
+
+
+
+for ac_func in stricmp strnicmp iswspace towlower towupper
 do
 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 echo "$as_me:$LINENO: checking for $ac_func" >&5

Modified: xerces/c/branches/jberry/3.0-unstable/configure.ac
URL: 
http://svn.apache.org/viewcvs/xerces/c/branches/jberry/3.0-unstable/configure.ac?rev=178715&r1=178714&r2=178715&view=diff
==============================================================================
--- xerces/c/branches/jberry/3.0-unstable/configure.ac (original)
+++ xerces/c/branches/jberry/3.0-unstable/configure.ac Thu May 26 17:10:16 2005
@@ -97,7 +97,7 @@
 #
 # Orchestrate the replacement of missing functions
 #
-AC_REPLACE_FUNCS([stricmp strnicmp])
+AC_REPLACE_FUNCS([stricmp strnicmp iswspace towlower towupper])
 
 
 

Modified: xerces/c/branches/jberry/3.0-unstable/lib/Makefile.in
URL: 
http://svn.apache.org/viewcvs/xerces/c/branches/jberry/3.0-unstable/lib/Makefile.in?rev=178715&r1=178714&r2=178715&view=diff
==============================================================================
--- xerces/c/branches/jberry/3.0-unstable/lib/Makefile.in (original)
+++ xerces/c/branches/jberry/3.0-unstable/lib/Makefile.in Thu May 26 17:10:16 
2005
@@ -59,8 +59,8 @@
 build_triplet = @build@
 host_triplet = @host@
 subdir = lib
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in stricmp.c \
-       strnicmp.c
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in iswspace.c \
+       stricmp.c strnicmp.c towlower.c towupper.c
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/cxx_have_bool.m4 \
        $(top_srcdir)/m4/cxx_have_lstring.m4 \
@@ -302,8 +302,11 @@
 distclean-compile:
        -rm -f *.tab.c
 
[EMAIL PROTECTED]@@am__include@ @[EMAIL PROTECTED](DEPDIR)/[EMAIL PROTECTED]@
 @AMDEP_TRUE@@am__include@ @[EMAIL PROTECTED](DEPDIR)/[EMAIL PROTECTED]@
 @AMDEP_TRUE@@am__include@ @[EMAIL PROTECTED](DEPDIR)/[EMAIL PROTECTED]@
[EMAIL PROTECTED]@@am__include@ @[EMAIL PROTECTED](DEPDIR)/[EMAIL PROTECTED]@
[EMAIL PROTECTED]@@am__include@ @[EMAIL PROTECTED](DEPDIR)/[EMAIL PROTECTED]@
 @AMDEP_TRUE@@am__include@ @[EMAIL PROTECTED]/$(DEPDIR)/[EMAIL PROTECTED]@
 
 .c.o:

Added: xerces/c/branches/jberry/3.0-unstable/lib/iswspace.c
URL: 
http://svn.apache.org/viewcvs/xerces/c/branches/jberry/3.0-unstable/lib/iswspace.c?rev=178715&view=auto
==============================================================================
--- xerces/c/branches/jberry/3.0-unstable/lib/iswspace.c (added)
+++ xerces/c/branches/jberry/3.0-unstable/lib/iswspace.c Thu May 26 17:10:16 
2005
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * $Id$
+ */
+
+#include "iswspace.h"
+
+int iswspace(int wc);
+{
+       return wc == ' ';
+}

Added: xerces/c/branches/jberry/3.0-unstable/lib/iswspace.h
URL: 
http://svn.apache.org/viewcvs/xerces/c/branches/jberry/3.0-unstable/lib/iswspace.h?rev=178715&view=auto
==============================================================================
--- xerces/c/branches/jberry/3.0-unstable/lib/iswspace.h (added)
+++ xerces/c/branches/jberry/3.0-unstable/lib/iswspace.h Thu May 26 17:10:16 
2005
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * $Id$
+ */
+
+#ifndef ISWSPACE_H
+#define ISWSPACE_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int iswspace(int wc);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

Modified: xerces/c/branches/jberry/3.0-unstable/lib/stricmp.c
URL: 
http://svn.apache.org/viewcvs/xerces/c/branches/jberry/3.0-unstable/lib/stricmp.c?rev=178715&r1=178714&r2=178715&view=diff
==============================================================================
--- xerces/c/branches/jberry/3.0-unstable/lib/stricmp.c (original)
+++ xerces/c/branches/jberry/3.0-unstable/lib/stricmp.c Thu May 26 17:10:16 2005
@@ -15,7 +15,7 @@
  */
 
 /*
- * $Id: DOM.hpp,v 1.12 2004/09/08 13:55:38 peiyongz Exp $
+ * $Id$
  */
 
 #include "stricmp.h"

Modified: xerces/c/branches/jberry/3.0-unstable/lib/stricmp.h
URL: 
http://svn.apache.org/viewcvs/xerces/c/branches/jberry/3.0-unstable/lib/stricmp.h?rev=178715&r1=178714&r2=178715&view=diff
==============================================================================
--- xerces/c/branches/jberry/3.0-unstable/lib/stricmp.h (original)
+++ xerces/c/branches/jberry/3.0-unstable/lib/stricmp.h Thu May 26 17:10:16 2005
@@ -1,6 +1,3 @@
-#ifndef STRICMP_H
-#define STRICMP_H
-
 /*
  * Copyright 2005 The Apache Software Foundation.
  * 
@@ -18,8 +15,11 @@
  */
 
 /*
- * $Id: DOM.hpp,v 1.12 2004/09/08 13:55:38 peiyongz Exp $
+ * $Id$
  */
+
+#ifndef STRICMP_H
+#define STRICMP_H
 
 #ifdef __cplusplus
 extern "C" {

Modified: xerces/c/branches/jberry/3.0-unstable/lib/strnicmp.c
URL: 
http://svn.apache.org/viewcvs/xerces/c/branches/jberry/3.0-unstable/lib/strnicmp.c?rev=178715&r1=178714&r2=178715&view=diff
==============================================================================
--- xerces/c/branches/jberry/3.0-unstable/lib/strnicmp.c (original)
+++ xerces/c/branches/jberry/3.0-unstable/lib/strnicmp.c Thu May 26 17:10:16 
2005
@@ -15,7 +15,7 @@
  */
 
 /*
- * $Id: DOM.hpp,v 1.12 2004/09/08 13:55:38 peiyongz Exp $
+ * $Id$
  */
 
 #include "strnicmp.h"

Modified: xerces/c/branches/jberry/3.0-unstable/lib/strnicmp.h
URL: 
http://svn.apache.org/viewcvs/xerces/c/branches/jberry/3.0-unstable/lib/strnicmp.h?rev=178715&r1=178714&r2=178715&view=diff
==============================================================================
--- xerces/c/branches/jberry/3.0-unstable/lib/strnicmp.h (original)
+++ xerces/c/branches/jberry/3.0-unstable/lib/strnicmp.h Thu May 26 17:10:16 
2005
@@ -1,6 +1,3 @@
-#ifndef STRNICMP_H
-#define STRNICMP_H
-
 /*
  * Copyright 2005 The Apache Software Foundation.
  * 
@@ -18,8 +15,11 @@
  */
 
 /*
- * $Id: DOM.hpp,v 1.12 2004/09/08 13:55:38 peiyongz Exp $
+ * $Id$
  */
+
+#ifndef STRNICMP_H
+#define STRNICMP_H
 
 #ifdef __cplusplus
 extern "C" {

Added: xerces/c/branches/jberry/3.0-unstable/lib/towlower.c
URL: 
http://svn.apache.org/viewcvs/xerces/c/branches/jberry/3.0-unstable/lib/towlower.c?rev=178715&view=auto
==============================================================================
--- xerces/c/branches/jberry/3.0-unstable/lib/towlower.c (added)
+++ xerces/c/branches/jberry/3.0-unstable/lib/towlower.c Thu May 26 17:10:16 
2005
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * $Id$
+ */
+
+#include "towlower.h"
+
+int towlower(int wc);
+{
+       return (wc >= 'A') && (wc <= 'Z')
+                               ? wc + 'a' - 'A'
+                               : wc
+                               ;
+}

Added: xerces/c/branches/jberry/3.0-unstable/lib/towlower.h
URL: 
http://svn.apache.org/viewcvs/xerces/c/branches/jberry/3.0-unstable/lib/towlower.h?rev=178715&view=auto
==============================================================================
--- xerces/c/branches/jberry/3.0-unstable/lib/towlower.h (added)
+++ xerces/c/branches/jberry/3.0-unstable/lib/towlower.h Thu May 26 17:10:16 
2005
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * $Id$
+ */
+
+#ifndef TOWLOWER_H
+#define TOWLOWER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int towlower(int wc);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

Added: xerces/c/branches/jberry/3.0-unstable/lib/towupper.c
URL: 
http://svn.apache.org/viewcvs/xerces/c/branches/jberry/3.0-unstable/lib/towupper.c?rev=178715&view=auto
==============================================================================
--- xerces/c/branches/jberry/3.0-unstable/lib/towupper.c (added)
+++ xerces/c/branches/jberry/3.0-unstable/lib/towupper.c Thu May 26 17:10:16 
2005
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * $Id$
+ */
+
+#include "towupper.h"
+
+int towupper(int c);
+{
+       return (c >= 'a') && (c <= 'z')
+                               ? c - 'a' + 'A'
+                               : c 
+                               ;
+}

Added: xerces/c/branches/jberry/3.0-unstable/lib/towupper.h
URL: 
http://svn.apache.org/viewcvs/xerces/c/branches/jberry/3.0-unstable/lib/towupper.h?rev=178715&view=auto
==============================================================================
--- xerces/c/branches/jberry/3.0-unstable/lib/towupper.h (added)
+++ xerces/c/branches/jberry/3.0-unstable/lib/towupper.h Thu May 26 17:10:16 
2005
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * $Id$
+ */
+
+#ifndef TOWUPPER_H
+#define TOWUPPER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int towupper(int wc);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif

Modified: 
xerces/c/branches/jberry/3.0-unstable/src/xercesc/util/Transcoders/Iconv/IconvTransService.cpp
URL: 
http://svn.apache.org/viewcvs/xerces/c/branches/jberry/3.0-unstable/src/xercesc/util/Transcoders/Iconv/IconvTransService.cpp?rev=178715&r1=178714&r2=178715&view=diff
==============================================================================
--- 
xerces/c/branches/jberry/3.0-unstable/src/xercesc/util/Transcoders/Iconv/IconvTransService.cpp
 (original)
+++ 
xerces/c/branches/jberry/3.0-unstable/src/xercesc/util/Transcoders/Iconv/IconvTransService.cpp
 Thu May 26 17:10:16 2005
@@ -22,18 +22,36 @@
 // ---------------------------------------------------------------------------
 //  Includes
 // ---------------------------------------------------------------------------
-#include "IconvTransService.hpp"
-#include <xercesc/util/XMLUniDefs.hpp>
-#include <xercesc/util/XMLUni.hpp>
-#include <xercesc/framework/MemoryManager.hpp>
 
-// *** TODO: May need some autoconf checks for wctype.h, and possible 
substitution thereof
-#include <wchar.h>
-#include <wctype.h>
+#include <config.h>
+
+#if HAVE_WCHAR_H
+#      include <wchar.h>
+#endif
+#if HAVE_WCTYPE_H
+#      include <wctype.h>
+#endif
+
+// Fill in for broken or missing wctype functions on some platforms
+#if !HAVE_ISWSPACE
+#      include <iswspace.h>
+#endif
+#if !HAVE_TOWUPPER
+#      include <towupper.h>
+#endif
+#if !HAVE_TOWLOWER
+#      include <towlower.h>
+#endif
 
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
+
+#include "IconvTransService.hpp"
+#include <xercesc/util/XMLUniDefs.hpp>
+#include <xercesc/util/XMLUni.hpp>
+#include <xercesc/framework/MemoryManager.hpp>
+
 
 XERCES_CPP_NAMESPACE_BEGIN
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to