[SCM] Samba Shared Repository - branch master updated - 396e53f9ffbaf1a70d2ffe327b3da56e24e62e17

Jelmer Vernooij jelmer at samba.org
Tue Oct 14 01:40:33 GMT 2008


The branch, master has been updated
       via  396e53f9ffbaf1a70d2ffe327b3da56e24e62e17 (commit)
       via  606c398fb834c3e057423dfce641b8a6b2d3f925 (commit)
       via  d4f647c859139a56b403e864ebb4ed08f40e35be (commit)
       via  efdc50344025d1081fbe35b2fab2d8948b0f36cb (commit)
       via  2d92361a1c279b3982fc7038f5e872dadc2590f6 (commit)
      from  e11277e28db19841e941c62478d99d3780cd238b (commit)

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


- Log -----------------------------------------------------------------
commit 396e53f9ffbaf1a70d2ffe327b3da56e24e62e17
Merge: 606c398fb834c3e057423dfce641b8a6b2d3f925 e11277e28db19841e941c62478d99d3780cd238b
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Tue Oct 14 03:39:56 2008 +0200

    Merge branch 'master' of git://git.samba.org/samba

commit 606c398fb834c3e057423dfce641b8a6b2d3f925
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Tue Oct 14 03:38:34 2008 +0200

    Rely on standard {u,}int{8,16,32,64}_t types provided by system or
    libreplace for {u,}int{8,16,32,64} defines.

commit d4f647c859139a56b403e864ebb4ed08f40e35be
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Tue Oct 14 03:17:52 2008 +0200

    Remove define for VOLATILE, volatile is already provided by libreplace.

commit efdc50344025d1081fbe35b2fab2d8948b0f36cb
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Tue Oct 14 03:14:46 2008 +0200

    MAXHOSTNAMELEN is already provided by libreplace if not by the system.

commit 2d92361a1c279b3982fc7038f5e872dadc2590f6
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Tue Oct 14 03:14:07 2008 +0200

    Remove unused data type schar. If we really need this, it should probably be typedeffed to int8_t.

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

Summary of changes:
 source3/include/includes.h          |   77 +++++------------------------------
 source3/lib/select.c                |    2 +-
 source3/nsswitch/winbind_nss_irix.c |    1 -
 source3/nsswitch/wins.c             |    1 -
 4 files changed, 11 insertions(+), 70 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/includes.h b/source3/include/includes.h
index 85a316b..0df4ef9 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -286,36 +286,20 @@ typedef int ber_int_t;
 #endif
 
 /*
- * Define VOLATILE if needed.
- */
-
-#if defined(HAVE_VOLATILE)
-#define VOLATILE volatile
-#else
-#define VOLATILE
-#endif
-
-/*
  * Define additional missing types
  */
 #if defined(HAVE_SIG_ATOMIC_T_TYPE) && defined(AIX)
 typedef sig_atomic_t SIG_ATOMIC_T;
 #elif defined(HAVE_SIG_ATOMIC_T_TYPE) && !defined(AIX)
-typedef sig_atomic_t VOLATILE SIG_ATOMIC_T;
+typedef sig_atomic_t volatile SIG_ATOMIC_T;
 #else
-typedef int VOLATILE SIG_ATOMIC_T;
+typedef int volatile SIG_ATOMIC_T;
 #endif
 
 #ifndef uchar
 #define uchar unsigned char
 #endif
 
-#ifdef HAVE_UNSIGNED_CHAR
-#define schar signed char
-#else
-#define schar char
-#endif
-
 /*
    Samba needs type definitions for int16, int32, uint16 and uint32.
 
@@ -326,15 +310,11 @@ typedef int VOLATILE SIG_ATOMIC_T;
 */
 
 #ifndef uint8
-#define uint8 unsigned char
+#define uint8 uint8_t
 #endif
 
 #if !defined(int16) && !defined(HAVE_INT16_FROM_RPC_RPC_H)
-#  if (SIZEOF_SHORT == 4)
-#    define int16 __ERROR___CANNOT_DETERMINE_TYPE_FOR_INT16;
-#  else /* SIZEOF_SHORT != 4 */
-#    define int16 short
-#  endif /* SIZEOF_SHORT != 4 */
+#  define int16 int16_t
    /* needed to work around compile issue on HP-UX 11.x */
 #  define _INT16	1
 #endif
@@ -344,25 +324,13 @@ typedef int VOLATILE SIG_ATOMIC_T;
  * case as int16 may be a typedef from rpc/rpc.h
  */
 
+
 #if !defined(uint16) && !defined(HAVE_UINT16_FROM_RPC_RPC_H)
-#if (SIZEOF_SHORT == 4)
-#define uint16 __ERROR___CANNOT_DETERMINE_TYPE_FOR_INT16;
-#else /* SIZEOF_SHORT != 4 */
-#define uint16 unsigned short
-#endif /* SIZEOF_SHORT != 4 */
+#  define uint16 uint16_t
 #endif
 
 #if !defined(int32) && !defined(HAVE_INT32_FROM_RPC_RPC_H)
-#  if (SIZEOF_INT == 4)
-#    define int32 int
-#  elif (SIZEOF_LONG == 4)
-#    define int32 long
-#  elif (SIZEOF_SHORT == 4)
-#    define int32 short
-#  else
-     /* uggh - no 32 bit type?? probably a CRAY. just hope this works ... */
-#    define int32 int
-#  endif
+#  define int32 int32_t
    /* needed to work around compile issue on HP-UX 11.x */
 #  define _INT32	1
 #endif
@@ -373,16 +341,7 @@ typedef int VOLATILE SIG_ATOMIC_T;
  */
 
 #if !defined(uint32) && !defined(HAVE_UINT32_FROM_RPC_RPC_H)
-#if (SIZEOF_INT == 4)
-#define uint32 unsigned int
-#elif (SIZEOF_LONG == 4)
-#define uint32 unsigned long
-#elif (SIZEOF_SHORT == 4)
-#define uint32 unsigned short
-#else
-/* uggh - no 32 bit type?? probably a CRAY. just hope this works ... */
-#define uint32 unsigned
-#endif
+#  define uint32 uint32_t
 #endif
 
 /*
@@ -390,19 +349,11 @@ typedef int VOLATILE SIG_ATOMIC_T;
  */
 
 #if !defined(uint64)
-#if (SIZEOF_LONG == 8)
-#define uint64 unsigned long
-#elif (SIZEOF_LONG_LONG == 8)
-#define uint64 unsigned long long
-#endif	/* don't lie.  If we don't have it, then don't use it */
+#  define uint64 uint64_t
 #endif
 
 #if !defined(int64)
-#if (SIZEOF_LONG == 8)
-#define int64 long
-#elif (SIZEOF_LONG_LONG == 8)
-#define int64 long long
-#endif	/* don't lie.  If we don't have it, then don't use it */
+#  define int64 int64_t
 #endif
 
 
@@ -914,14 +865,6 @@ int setresuid(uid_t ruid, uid_t euid, uid_t suid);
 int setresgid(gid_t rgid, gid_t egid, gid_t sgid);
 #endif
 
-/*
- * Some older systems seem not to have MAXHOSTNAMELEN
- * defined.
- */
-#ifndef MAXHOSTNAMELEN
-#define MAXHOSTNAMELEN 255
-#endif
-
 /* yuck, I'd like a better way of doing this */
 #define DIRP_SIZE (256 + 32)
 
diff --git a/source3/lib/select.c b/source3/lib/select.c
index 1bb1a75..14e5925 100644
--- a/source3/lib/select.c
+++ b/source3/lib/select.c
@@ -30,7 +30,7 @@
 
 static pid_t initialised;
 static int select_pipe[2];
-static VOLATILE unsigned pipe_written, pipe_read;
+static volatile unsigned pipe_written, pipe_read;
 
 /*******************************************************************
  Call this from all Samba signal handlers if you want to avoid a 
diff --git a/source3/nsswitch/winbind_nss_irix.c b/source3/nsswitch/winbind_nss_irix.c
index 4726c1e..5bc0fa5 100644
--- a/source3/nsswitch/winbind_nss_irix.c
+++ b/source3/nsswitch/winbind_nss_irix.c
@@ -32,7 +32,6 @@ int asprintf(char **,const char *, ...) PRINTF_ATTRIBUTE(2,3);
 #endif
 
 #ifdef HAVE_NS_API_H
-#undef VOLATILE
 #undef STATIC
 #undef DYNAMIC
 #include <ns_daemon.h>
diff --git a/source3/nsswitch/wins.c b/source3/nsswitch/wins.c
index 7d42381..2f82997 100644
--- a/source3/nsswitch/wins.c
+++ b/source3/nsswitch/wins.c
@@ -20,7 +20,6 @@
 
 #include "includes.h"
 #ifdef HAVE_NS_API_H
-#undef VOLATILE
 
 #include <ns_daemon.h>
 #endif


-- 
Samba Shared Repository


More information about the samba-cvs mailing list