This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix WinCE build
authorDaniel Dragan <bulk88@hotmail.com>
Thu, 9 Oct 2014 23:43:13 +0000 (19:43 -0400)
committerKarl Williamson <khw@cpan.org>
Fri, 10 Oct 2014 01:21:40 +0000 (19:21 -0600)
locale changes in 2014 broke WinCE build. localconv() doesn't exist on
WinCE. locale.h from celib has to be included for
setlocale()/xcesetlocale() and LC_* constants.

perl.h
win32/config.ce
win32/config_H.ce

diff --git a/perl.h b/perl.h
index 3235476..0bd8a53 100644 (file)
--- a/perl.h
+++ b/perl.h
 #  endif
 #endif
 
+/* EVC 4 SDK headers includes a bad definition of MB_CUR_MAX in stdlib.h
+  which is included from stdarg.h. Bad definition not present in SD 2008
+  SDK headers. wince.h is not yet included, so we cant fix this from there
+  since by then MB_CUR_MAX will be defined from stdlib.h.
+  cewchar.h includes a correct definition of MB_CUR_MAX and it is copied here
+  since cewchar.h can't be included this early */
+#if defined(UNDER_CE) && (_MSC_VER < 1300)
+#  define MB_CUR_MAX 1
+#endif
 #ifdef I_STDARG
 #  include <stdarg.h>
 #else
index 37be642..d63df39 100644 (file)
@@ -303,7 +303,7 @@ d_link='define'
 d_localtime64='undef'
 d_localtime_r='undef'
 d_localtime_r_needs_tzset='undef'
-d_locconv='define'
+d_locconv='undef'
 d_lockf='undef'
 d_longdbl='undef'
 d_longlong='undef'
@@ -656,7 +656,7 @@ i_inttypes='undef'
 i_langinfo='undef'
 i_libutil='undef'
 i_limits='define'
-i_locale='undef'
+i_locale='define'
 i_machcthr='undef'
 i_malloc='define'
 i_mallocmalloc='undef'
index e2837a6..196f419 100644 (file)
  *     This symbol, if defined, indicates that the localeconv routine is
  *     available for numeric and monetary formatting conventions.
  */
-#define HAS_LOCALECONV /**/
+/*#define HAS_LOCALECONV       /**/
 
 /* HAS_LOCKF:
  *     This symbol, if defined, indicates that the lockf routine is