Fix Unicode includes in NSString.m

Fixes compilation using ICU bundled with Windows.
This commit is contained in:
Frederik Seiffert 2024-05-14 09:34:20 +02:00 committed by Frederik Seiffert
parent 6e2bd5c4e8
commit 94a6cb9919
4 changed files with 19 additions and 13 deletions

View file

@ -750,6 +750,9 @@
/* Define if libobjc has the _objc_unexpected_exception callback */
#undef HAVE_UNEXPECTED
/* Define to 1 if you have the <unicode/ubrk.h> header file. */
#undef HAVE_UNICODE_UBRK_H
/* Define to 1 if you have the <unicode/ucal.h> header file. */
#undef HAVE_UNICODE_UCAL_H
@ -792,6 +795,9 @@
/* Define to 1 if you have the <unicode/utext.h> header file. */
#undef HAVE_UNICODE_UTEXT_H
/* Define to 1 if you have the <unicode/utypes.h> header file. */
#undef HAVE_UNICODE_UTYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H

View file

@ -66,11 +66,13 @@
#import "Foundation/NSLocale.h"
#import "Foundation/NSLock.h"
#import "Foundation/NSNotification.h"
#import "Foundation/NSObjCRuntime.h"
#import "Foundation/NSScanner.h"
#import "Foundation/NSUserDefaults.h"
#import "Foundation/FoundationErrors.h"
// For private method _decodePropertyListForKey:
#import "Foundation/NSKeyedArchiver.h"
#import "GNUstepBase/GSBlocks.h"
#import "GNUstepBase/GSMime.h"
#import "GNUstepBase/NSString+GNUstepBase.h"
#import "GNUstepBase/NSMutableString+GNUstepBase.h"
@ -102,24 +104,22 @@
#if defined(HAVE_UNICODE_UNORM2_H)
# include <unicode/unorm2.h>
#endif
#if defined(HAVE_UNICODE_USTRING_H)
#if defined(HAVE_UNICODE_USTRING_H)
# include <unicode/ustring.h>
#endif
#if defined(HAVE_UNICODE_USEARCH_H)
#if defined(HAVE_UNICODE_USEARCH_H)
# include <unicode/usearch.h>
#endif
#if defined(HAVE_ICU_H)
#if defined(HAVE_UNICODE_UBRK_H)
# include <unicode/ubrk.h>
#endif
#if defined(HAVE_UNICODE_UTYPES_H)
# include <unicode/utypes.h>
#endif
#if defined(HAVE_ICU_H)
# include <icu.h>
#endif
#import "Foundation/NSObjCRuntime.h"
#import "GNUstepBase/GSBlocks.h"
#if GS_USE_ICU
#include <unicode/ubrk.h>
#include <unicode/utypes.h>
#endif
/* Create local inline versions of key functions for case-insensitive operations
*/
#import "Additions/unicode/caseconv.h"

2
configure vendored
View file

@ -13601,7 +13601,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
for ac_header in unicode/uloc.h unicode/ulocdata.h unicode/ucol.h unicode/ucurr.h unicode/uregex.h unicode/ucal.h unicode/unorm2.h unicode/unum.h unicode/udat.h unicode/udatpg.h unicode/ustring.h unicode/usearch.h unicode/ucnv.h unicode/utext.h
for ac_header in unicode/uloc.h unicode/ulocdata.h unicode/ucol.h unicode/ucurr.h unicode/uregex.h unicode/ucal.h unicode/unorm2.h unicode/unum.h unicode/udat.h unicode/udatpg.h unicode/ustring.h unicode/usearch.h unicode/ucnv.h unicode/utext.h unicode/ubrk.h unicode/utypes.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"

View file

@ -3571,7 +3571,7 @@ AS_IF([test "x$enable_icu" = "xyes"], [
esac
if test $HAVE_ICU = 0; then
PKG_CHECK_MODULES([ICU], [icu-i18n > 49.0], [
AC_CHECK_HEADERS([unicode/uloc.h unicode/ulocdata.h unicode/ucol.h unicode/ucurr.h unicode/uregex.h unicode/ucal.h unicode/unorm2.h unicode/unum.h unicode/udat.h unicode/udatpg.h unicode/ustring.h unicode/usearch.h unicode/ucnv.h unicode/utext.h],
AC_CHECK_HEADERS([unicode/uloc.h unicode/ulocdata.h unicode/ucol.h unicode/ucurr.h unicode/uregex.h unicode/ucal.h unicode/unorm2.h unicode/unum.h unicode/udat.h unicode/udatpg.h unicode/ustring.h unicode/usearch.h unicode/ucnv.h unicode/utext.h unicode/ubrk.h unicode/utypes.h],
HAVE_ICU=1)], [HAVE_ICU=0])
fi
if test $HAVE_ICU = 0; then