Skip to content

Commit

Permalink
XXX merge, vutil.h, probably combine with final vutil.c
Browse files Browse the repository at this point in the history
  • Loading branch information
khwilliamson committed Feb 16, 2018
1 parent d5b9d6e commit bdc9493
Showing 1 changed file with 18 additions and 11 deletions.
29 changes: 18 additions & 11 deletions vutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,21 +223,28 @@ const char * Perl_prescan_version(pTHX_ const char *s, bool strict, const char**
#endif


#if PERL_VERSION_LT(5,19,0)
# undef STORE_NUMERIC_LOCAL_SET_STANDARD
# undef RESTORE_NUMERIC_LOCAL
# ifdef USE_LOCALE
# define STORE_NUMERIC_LOCAL_SET_STANDARD()\
char *loc = savepv(setlocale(LC_NUMERIC, NULL)); \
#if PERL_VERSION_LT(5,27,8) /*XXX use correct version */
# define LC_NUMERIC_LOCK
# define LC_NUMERIC_UNLOCK
# if PERL_VERSION_LT(5,19,0)
# undef STORE_LC_NUMERIC_SET_STANDARD
# undef RESTORE_LC_NUMERIC
# undef DECLARATION_FOR_LC_NUMERIC_MANIPULATION
# ifdef USE_LOCALE
# define DECLARATION_FOR_LC_NUMERIC_MANIPULATION char *loc
# define STORE_NUMERIC_SET_STANDARD()\
loc = savepv(setlocale(LC_NUMERIC, NULL)); \
SAVEFREEPV(loc); \
setlocale(LC_NUMERIC, "C");

# define RESTORE_NUMERIC_LOCAL()\
# define RESTORE_LC_NUMERIC()\
setlocale(LC_NUMERIC, loc);
# else
# define STORE_NUMERIC_LOCAL_SET_STANDARD()
# define RESTORE_NUMERIC_LOCAL()
# endif
# else
# define DECLARATION_FOR_LC_NUMERIC_MANIPULATION
# define STORE_LC_NUMERIC_SET_STANDARD()
# define RESTORE_LC_NUMERIC()
# endif
# endif
#endif

#ifndef LOCK_NUMERIC_STANDARD
Expand Down

0 comments on commit bdc9493

Please sign in to comment.