summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-12-27 20:52:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:05:58 -0500
commit5a4881bf396e691524329bcd6aa1ae4a7f4084ec (patch)
treeea2cce14847e28629ec48f2a70f547bdbb08fe98 /source3/include
parentd186ff50721011f839a02aaac4866201eda23034 (diff)
downloadsamba-5a4881bf396e691524329bcd6aa1ae4a7f4084ec.tar.gz
samba-5a4881bf396e691524329bcd6aa1ae4a7f4084ec.tar.bz2
samba-5a4881bf396e691524329bcd6aa1ae4a7f4084ec.zip
r12522: Try and fix bug #2926 by removing setlocale(LC_ALL, "C")
and replace calls to isupper/islower/toupper/tolower with ASCII equivalents (mapping into _w variants). Jeremy. (This used to be commit c2752347eb2deeb2798c580ec7fc751a847717e9)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/smb.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h
index fc256c6f69..4f378f822e 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -172,6 +172,9 @@ typedef smb_ucs2_t wfstring[FSTRING_LEN];
/* turn a 7 bit character into a ucs2 character */
#define UCS2_CHAR(c) ((c) << UCS2_SHIFT)
+/* return an ascii version of a ucs2 character */
+#define UCS2_TO_CHAR(c) ((c) & 0xff)
+
/* Copy into a smb_ucs2_t from a possibly unaligned buffer. Return the copied smb_ucs2_t */
#define COPY_UCS2_CHAR(dest,src) (((unsigned char *)(dest))[0] = ((unsigned char *)(src))[0],\
((unsigned char *)(dest))[1] = ((unsigned char *)(src))[1], (dest))