mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
fix to build with older ICU
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31746 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
99d78c80fc
commit
49abda74b2
4 changed files with 18 additions and 5 deletions
|
@ -93,7 +93,14 @@ static UCalendarDateFields _NSCalendarUnitToDateField (NSCalendarUnit unit)
|
|||
if (tzLen > TZ_NAME_LENGTH)
|
||||
tzLen = TZ_NAME_LENGTH;
|
||||
[tzName getCharacters: cTzId range: NSMakeRange(0, tzLen)];
|
||||
|
||||
|
||||
#ifndef UCAL_DEFAULT
|
||||
/*
|
||||
* Older versions of ICU used UCAL_TRADITIONAL rather than UCAL_DEFAULT
|
||||
* so if one is not available we use the other.
|
||||
*/
|
||||
#define UCAL_DEFAULT UCAL_TRADITIONAL
|
||||
#endif
|
||||
_cal =
|
||||
ucal_open ((const UChar *)cTzId, tzLen, cLocaleId, UCAL_DEFAULT, &err);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue