[SCM] Samba Shared Repository - branch master updated

Jelmer Vernooij jelmer at samba.org
Fri Jun 25 14:49:38 MDT 2010


The branch, master has been updated
       via  e40afe9... Move UCS2 macros to common code
      from  afc6d2f... Don't use frame as the talloc ctx in open_schannel_session_store(), as this breaks running from inetd (we free frame below). Use NULL instead.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit e40afe975accd8199ffe54ea9f3c4dedd02edb02
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Fri Jun 25 21:51:23 2010 +0200

    Move UCS2 macros to common code

-----------------------------------------------------------------------

Summary of changes:
 lib/util/charset/charset.h |   23 +++++++++++++++++++++++
 source3/include/smb.h      |   21 ---------------------
 2 files changed, 23 insertions(+), 21 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/charset/charset.h b/lib/util/charset/charset.h
index cc57b3e..68907aa 100644
--- a/lib/util/charset/charset.h
+++ b/lib/util/charset/charset.h
@@ -40,6 +40,29 @@ typedef enum {CH_UTF16LE=0, CH_UTF16=0, CH_UNIX, CH_DISPLAY, CH_DOS, CH_UTF8, CH
 typedef uint16_t smb_ucs2_t;
 
 /*
+ * SMB UCS2 (16-bit unicode) internal type.
+ * smb_ucs2_t is *always* in little endian format.
+ */
+
+#ifdef WORDS_BIGENDIAN
+#define UCS2_SHIFT 8
+#else
+#define UCS2_SHIFT 0
+#endif
+
+/* 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) >> UCS2_SHIFT) & 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))
+
+
+
+/*
  *   for each charset we have a function that pulls from that charset to
  *     a ucs2 buffer, and a function that pushes to a ucs2 buffer
  *     */
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 3cbd0c0..defecd7 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -144,27 +144,6 @@ typedef union unid_t {
 	gid_t gid;
 } unid_t;
 
-/*
- * SMB UCS2 (16-bit unicode) internal type.
- * smb_ucs2_t is *always* in little endian format.
- */
-
-#ifdef WORDS_BIGENDIAN
-#define UCS2_SHIFT 8
-#else
-#define UCS2_SHIFT 0
-#endif
-
-/* 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) >> UCS2_SHIFT) & 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))
-
 /* pipe string names */
 #define PIPE_LANMAN   "\\PIPE\\LANMAN"
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list