summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2014-06-12 14:35:45 -0600
committerKarl Williamson <khw@cpan.org>2014-06-12 15:04:54 -0600
commit91191cf732548d9b59655daee2195082e6ce0082 (patch)
tree88bc66ec0ad9d5905e6edc21c11f0ab053b27fef /perl.h
parent5a6bb681360972ef854d7b6b457148c9b1aa61a8 (diff)
downloadperl-91191cf732548d9b59655daee2195082e6ce0082.tar.gz
Fix some compilation warnings
After commits d6ded95025185cb1ec8ca3ba5879cab881d8b180 and 130c5df3625bd130cd1e2771308fcd4eb66cebb2, there are some compilation warnings if not all locale categories are used.
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/perl.h b/perl.h
index 4c5e8f026f..82c1d91530 100644
--- a/perl.h
+++ b/perl.h
@@ -5276,6 +5276,7 @@ typedef struct am_table_short AMTS;
#define PERLDB_SAVESRC_NOSUBS (PL_perldb && (PL_perldb & PERLDBf_SAVESRC_NOSUBS))
#define PERLDB_SAVESRC_INVALID (PL_perldb && (PL_perldb & PERLDBf_SAVESRC_INVALID))
+#ifdef USE_LOCALE
/* These locale things are all subject to change */
/* Returns TRUE if the plain locale pragma without a parameter is in effect
*/
@@ -5305,6 +5306,22 @@ typedef struct am_table_short AMTS;
#define IN_LC_RUNTIME(category) (IN_LC_ALL_RUNTIME || (IN_LC_PARTIAL_RUNTIME && _is_in_locale_category(FALSE, (category))))
#define IN_LC(category) (IN_LC_COMPILETIME(category) || IN_LC_RUNTIME(category))
+#else /* No locale usage */
+# define IN_LOCALE_RUNTIME 0
+# define IN_SOME_LOCALE_FORM_RUNTIME 0
+# define IN_LOCALE_COMPILETIME 0
+# define IN_SOME_LOCALE_FORM_COMPILETIME 0
+# define IN_LOCALE 0
+# define IN_SOME_LOCALE_FORM 0
+# define IN_LC_ALL_COMPILETIME 0
+# define IN_LC_ALL_RUNTIME 0
+# define IN_LC_PARTIAL_COMPILETIME 0
+# define IN_LC_PARTIAL_RUNTIME 0
+# define IN_LC_COMPILETIME(category) 0
+# define IN_LC_RUNTIME(category) 0
+# define IN_LC(category) 0
+#endif
+
#ifdef USE_LOCALE_NUMERIC
/* These macros are for toggling between the underlying locale (LOCAL) and the
@@ -5415,8 +5432,6 @@ typedef struct am_table_short AMTS;
#define UNLOCK_NUMERIC_STANDARD()
#define Atof my_atof
-#define IN_LOCALE_RUNTIME 0
-#define IN_LOCALE_COMPILETIME 0
#endif /* !USE_LOCALE_NUMERIC */