diff options
author | Christopher Faylor <me@cgf.cx> | 2010-01-29 17:37:54 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2010-01-29 17:37:54 +0000 |
commit | 2b37c431b1c2f4e90fd7c6130b8bddc9e9c019f9 (patch) | |
tree | fd975777ae3c324240216cbcd44f9cdfa0e5c051 /winsup/cygwin/libc/strfmon.c | |
parent | 3432d6f1f766adc1b8c14af4cc63b6ae25399ada (diff) | |
download | cygnal-2b37c431b1c2f4e90fd7c6130b8bddc9e9c019f9.tar.gz cygnal-2b37c431b1c2f4e90fd7c6130b8bddc9e9c019f9.tar.bz2 cygnal-2b37c431b1c2f4e90fd7c6130b8bddc9e9c019f9.zip |
* libc/strfmon.c (__setup_vars): Fix compiler warning about assigning const
strings. Compare a pointer to NULL rather than '\0'.
* dll_init.cc (dll_dllcrt0_1): Minor comment fix.
* pipe.cc (fhandler_pipe::create_selectable): Remove Win9x accommodation.
Diffstat (limited to 'winsup/cygwin/libc/strfmon.c')
-rw-r--r-- | winsup/cygwin/libc/strfmon.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/libc/strfmon.c b/winsup/cygwin/libc/strfmon.c index 2c2523ee8..ac23aa05b 100644 --- a/winsup/cygwin/libc/strfmon.c +++ b/winsup/cygwin/libc/strfmon.c @@ -413,12 +413,13 @@ __setup_vars(int flags, char *cs_precedes, char *sep_by_space, char *sign_posn, char **signstr) { struct lconv *lc = localeconv(); + static char negative[] = "-"; if ((flags & IS_NEGATIVE) && (flags & USE_INTL_CURRENCY)) { *cs_precedes = lc->int_n_cs_precedes; *sep_by_space = lc->int_n_sep_by_space; *sign_posn = (flags & PARENTH_POSN) ? 0 : lc->int_n_sign_posn; - *signstr = (lc->negative_sign == '\0') ? "-" + *signstr = (lc->negative_sign == NULL) ? negative : lc->negative_sign; } else if (flags & USE_INTL_CURRENCY) { *cs_precedes = lc->int_p_cs_precedes; @@ -429,7 +430,7 @@ __setup_vars(int flags, char *cs_precedes, char *sep_by_space, *cs_precedes = lc->n_cs_precedes; *sep_by_space = lc->n_sep_by_space; *sign_posn = (flags & PARENTH_POSN) ? 0 : lc->n_sign_posn; - *signstr = (lc->negative_sign == '\0') ? "-" + *signstr = (lc->negative_sign == NULL) ? negative : lc->negative_sign; } else { *cs_precedes = lc->p_cs_precedes; |