You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by am...@apache.org on 2007/07/17 18:11:31 UTC
svn commit: r556955 - in /xerces/c/trunk: configure.ac
src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp
Author: amassari
Date: Tue Jul 17 09:11:27 2007
New Revision: 556955
URL: http://svn.apache.org/viewvc?view=rev&rev=556955
Log:
GNUIconv should not look at APP_NO_THREADS, and look at where endian.h is located
Modified:
xerces/c/trunk/configure.ac
xerces/c/trunk/src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp
Modified: xerces/c/trunk/configure.ac
URL: http://svn.apache.org/viewvc/xerces/c/trunk/configure.ac?view=diff&rev=556955&r1=556954&r2=556955
==============================================================================
--- xerces/c/trunk/configure.ac (original)
+++ xerces/c/trunk/configure.ac Tue Jul 17 09:11:27 2007
@@ -72,12 +72,13 @@
AC_HEADER_STDC
AC_HEADER_TIME
AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h inttypes.h langinfo.h limits.h locale.h \
- memory.h netdb.h netinet/in.h nl_types.h stddef.h stdint.h stdlib.h \
- string.h strings.h \
- sys/param.h sys/socket.h sys/time.h sys/timeb.h \
- unistd.h wchar.h wctype.h \
- CoreServices/CoreServices.h \
- ])
+ memory.h netdb.h netinet/in.h nl_types.h stddef.h stdint.h stdlib.h \
+ string.h strings.h \
+ sys/param.h sys/socket.h sys/time.h sys/timeb.h \
+ unistd.h wchar.h wctype.h \
+ CoreServices/CoreServices.h \
+ endian.h machine/endian.h \
+ ])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
Modified: xerces/c/trunk/src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp?view=diff&rev=556955&r1=556954&r2=556955
==============================================================================
--- xerces/c/trunk/src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp Tue Jul 17 09:11:27 2007
@@ -26,7 +26,11 @@
#include <locale.h>
#include <errno.h>
-#include <endian.h>
+#if HAVE_ENDIAN_H
+ #include <endian.h>
+#elif HAVE_MACHINE_ENDIAN_H
+ #include <machine/endian.h>
+#endif
#include <xercesc/util/XMLString.hpp>
#include <xercesc/util/XMLUniDefs.hpp>
@@ -36,26 +40,16 @@
#include <xercesc/util/Janitor.hpp>
#include "IconvGNUTransService.hpp"
-#if !defined(APP_NO_THREADS)
#include <xercesc/util/Mutexes.hpp>
#include <xercesc/util/XMLRegisterCleanup.hpp>
-#endif /* !APP_NO_THREADS */
XERCES_CPP_NAMESPACE_BEGIN
-#if !defined(APP_NO_THREADS)
-
// Iconv() access syncronization point
static XMLMutex *gIconvMutex = NULL;
static XMLRegisterCleanup IconvGNUMutexCleanup;
# define ICONV_LOCK XMLMutexLock lockConverter(gIconvMutex);
-#else /* APP_NO_THREADS */
-
-# define ICONV_LOCK
-
-#endif /* !APP_NO_THREADS */
-
// ---------------------------------------------------------------------------
// Description of encoding schemas, supported by iconv()
// ---------------------------------------------------------------------------
@@ -407,7 +401,6 @@
IconvGNUTransService::IconvGNUTransService()
: IconvGNUWrapper(), fUnicodeCP(0)
{
-#if !defined(APP_NO_THREADS)
// Create global lock object
if (gIconvMutex == NULL) {
gIconvMutex = new XMLMutex;
@@ -415,7 +408,6 @@
XMLPlatformUtils::panic (PanicHandler::Panic_NoTransService);
IconvGNUMutexCleanup.registerCleanup(reinitIconvGNUMutex);
}
-#endif
// Try to obtain local (host) characterset from the setlocale
// and through the environment. Do not call setlocale(LC_*, "")!
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org