diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-08-31 17:39:51 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-08-31 17:39:51 +0000 |
commit | f170e5798fd7634a1be2c748464acb2ca485c9a3 (patch) | |
tree | 26153067b5e0ef42fca4ead32813c6b445006d75 /src/common/compat.h | |
parent | bc0c39f85de6b55e431c13c85522abd2d2bccf7d (diff) | |
download | tor-f170e5798fd7634a1be2c748464acb2ca485c9a3.tar.gz tor-f170e5798fd7634a1be2c748464acb2ca485c9a3.zip |
r8692@Kushana: nickm | 2006-08-31 13:38:07 -0400
Fix bug 327 (part 2): Cast char to unsigned char before passing to toupper/tolower. (Follow the same idiom as with isupper and friends, in case we run into the same problem on SGI or whereever it was.)
svn:r8310
Diffstat (limited to 'src/common/compat.h')
-rw-r--r-- | src/common/compat.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/compat.h b/src/common/compat.h index a4f52040a0..f0757d577f 100644 --- a/src/common/compat.h +++ b/src/common/compat.h @@ -155,6 +155,9 @@ const void *tor_memmem(const void *haystack, size_t hlen, const void *needle, #define TOR_ISLOWER(c) islower((int)(unsigned char)(c)) #define TOR_ISUPPER(c) isupper((int)(unsigned char)(c)) +#define TOR_TOLOWER(c) ((char)tolower((int)(unsigned char)(c))) +#define TOR_TOUPPER(c) ((char)toupper((int)(unsigned char)(c))) + #ifdef MS_WINDOWS #define _SHORT_FILE_ (tor_fix_source_file(__FILE__)) const char *tor_fix_source_file(const char *fname); |