r15191: Avoid uint_t as it's not standard.
authorJelmer Vernooij <jelmer@samba.org>
Mon, 24 Apr 2006 09:36:09 +0000 (09:36 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:04:15 +0000 (14:04 -0500)
(This used to be commit 7af59357b94e3819415b3a9257be0ced745ce130)

17 files changed:
source4/client/client.c
source4/lib/crypto/md5.c
source4/lib/registry/reg_backend_w95.c
source4/lib/util/debug.c
source4/lib/util/pidfile.c
source4/lib/util/util.c
source4/libcli/raw/raweas.c
source4/libcli/raw/rawnotify.c
source4/libcli/raw/rawrequest.c
source4/libcli/raw/request.h
source4/libcli/raw/smb_signing.c
source4/libcli/smb2/request.c
source4/libcli/smb2/smb2.h
source4/main.mk
source4/scripting/swig/config.mk
source4/smb_server/smb/request.c
source4/smb_server/smb2/receive.c

index 4e84987b407ddeba1155269764a185f59414aaff..328fd8d853c25daf37749821b366df41f269b417 100644 (file)
@@ -2186,7 +2186,7 @@ static int cmd_chmod(struct smbclient_context *ctx, const char **args)
 
        if (NT_STATUS_IS_ERR(smbcli_unix_chmod(ctx->cli->tree, src, mode))) {
                d_printf("%s chmod file %s 0%o\n",
-                       smbcli_errstr(ctx->cli->tree), src, (uint_t)mode);
+                       smbcli_errstr(ctx->cli->tree), src, (mode_t)mode);
                return 1;
        } 
 
index b607e938425ae81998356756c8ec4a3c6dd28cfd..584c46ef2d6ffac35e7c4b190b16d34c3f802c99 100644 (file)
@@ -58,7 +58,7 @@ _PUBLIC_ void MD5Init(struct MD5Context *ctx)
  * Update context to reflect the concatenation of another buffer full
  * of bytes.
  */
-_PUBLIC_ void MD5Update(struct MD5Context *ctx, const uint8_t *buf, uint_t len)
+_PUBLIC_ void MD5Update(struct MD5Context *ctx, const uint8_t *buf, size_t len)
 {
     register uint32_t t;
 
index d5ce0e33f867b25f6fe02f30227b0cf0f1ce64b7..1d3781c583d3cf3d3419143657c3ba6e4c7cd3cf 100644 (file)
@@ -42,7 +42,7 @@
  * the keys and the RGDB contains the actual data.
  */
 
-typedef uint_t DWORD;
+typedef uint32_t DWORD;
 typedef unsigned short WORD;
 
 typedef struct creg_block {
index fa781c823a6a5f7e5a06d63e50b828257dddff3a..9084c2b406d920249b6d0aeb7b04397672c14270 100644 (file)
@@ -182,7 +182,7 @@ _PUBLIC_ void setup_logging(const char *prog_name, enum debug_logtype new_logtyp
   return a string constant containing n tabs
   no more than 10 tabs are returned
 */
-_PUBLIC_ const char *do_debug_tab(uint_t n)
+_PUBLIC_ const char *do_debug_tab(int n)
 {
        const char *tabs[] = {"", "\t", "\t\t", "\t\t\t", "\t\t\t\t", "\t\t\t\t\t", 
                              "\t\t\t\t\t\t", "\t\t\t\t\t\t\t", "\t\t\t\t\t\t\t\t", 
index 1a46e6e70c91200bc641919910b40a239d76a1d4..dc9ecafae928e8aa5da28dc66fd8e84c86401494 100644 (file)
@@ -40,7 +40,7 @@ _PUBLIC_ pid_t pidfile_pid(const char *name)
 {
        int fd;
        char pidstr[20];
-       uint_t ret;
+       pid_t ret;
        char *pidFile;
 
        asprintf(&pidFile, "%s/%s.pid", lp_piddir(), name);
@@ -58,9 +58,9 @@ _PUBLIC_ pid_t pidfile_pid(const char *name)
                goto noproc;
        }
 
-       ret = atoi(pidstr);
+       ret = (pid_t)atoi(pidstr);
        
-       if (!process_exists((pid_t)ret)) {
+       if (!process_exists(ret)) {
                goto noproc;
        }
 
@@ -71,7 +71,7 @@ _PUBLIC_ pid_t pidfile_pid(const char *name)
 
        close(fd);
        SAFE_FREE(pidFile);
-       return (pid_t)ret;
+       return ret;
 
  noproc:
        close(fd);
@@ -113,7 +113,7 @@ void pidfile_create(const char *name)
        }
 
        memset(buf, 0, sizeof(buf));
-       slprintf(buf, sizeof(buf) - 1, "%u\n", (uint_t) getpid());
+       slprintf(buf, sizeof(buf) - 1, "%u\n", (unsigned int) getpid());
        if (write(fd, buf, strlen(buf)) != (ssize_t)strlen(buf)) {
                DEBUG(0,("ERROR: can't write to file %s: %s\n", 
                         pidFile, strerror(errno)));
index b7293c00923e96d5bf968df3894919aec5332d9b..0354d170971e1348960b93d9f55d5a97058ec082 100644 (file)
@@ -212,7 +212,7 @@ _PUBLIC_ int set_blocking(int fd, BOOL set)
  Sleep for a specified number of milliseconds.
 **/
 
-_PUBLIC_ void msleep(uint_t t)
+_PUBLIC_ void msleep(unsigned int t)
 {
        struct timeval tval;  
 
@@ -581,7 +581,7 @@ _PUBLIC_ void dump_data_pw(const char *msg, const uint8_t * data, size_t len)
  * see if a range of memory is all zero. A NULL pointer is considered
  * to be all zero 
  */
-_PUBLIC_ BOOL all_zero(const uint8_t *ptr, uint_t size)
+_PUBLIC_ BOOL all_zero(const uint8_t *ptr, size_t size)
 {
        int i;
        if (!ptr) return True;
index 4c609aa59378fa61f734af8bd30e55f86c28117b..26b04838d6e27ae9f623ce395a94e8d125a02782 100644 (file)
@@ -26,7 +26,7 @@
   This assumes the names are strict ascii, which should be a
   reasonable assumption
 */
-uint_t ea_list_size(uint_t num_eas, struct ea_struct *eas)
+size_t ea_list_size(uint_t num_eas, struct ea_struct *eas)
 {
        uint_t total = 4;
        int i;
@@ -54,7 +54,7 @@ static uint_t ea_name_list_size(uint_t num_names, struct ea_name *eas)
   This assumes the names are strict ascii, which should be a
   reasonable assumption
 */
-uint_t ea_list_size_chained(uint_t num_eas, struct ea_struct *eas)
+size_t ea_list_size_chained(uint_t num_eas, struct ea_struct *eas)
 {
        uint_t total = 0;
        int i;
index 8ae5098c012acce07a5d175445277a3653c0f54b..f4d416401612a88fd6c40c666476b6d443d3f7cf 100644 (file)
@@ -96,7 +96,7 @@ NTSTATUS smb_raw_changenotify_recv(struct smbcli_request *req,
   we need to do find out to what request the reply belongs
 ****************************************************************************/
 struct smbcli_request *smbcli_handle_ntcancel_reply(struct smbcli_request *req,
-                                                   uint_t len, const uint8_t *hdr)
+                                                   size_t len, const uint8_t *hdr)
 {
        struct smbcli_request *ntcancel;
 
index 24390cd9e7d1c22bdf453ddc378a5239bfd2d1da..f042c7b58104619a96f835d812206c73e6ac2db8 100644 (file)
@@ -64,7 +64,7 @@ NTSTATUS smbcli_request_destroy(struct smbcli_request *req)
   low-level function to setup a request buffer for a non-SMB packet 
   at the transport level
 */
-struct smbcli_request *smbcli_request_setup_nonsmb(struct smbcli_transport *transport, uint_t size)
+struct smbcli_request *smbcli_request_setup_nonsmb(struct smbcli_transport *transport, size_t size)
 {
        struct smbcli_request *req;
 
@@ -147,7 +147,7 @@ struct smbcli_request *smbcli_request_setup_transport(struct smbcli_transport *t
   way. This interface is used before a session is setup.
 */
 struct smbcli_request *smbcli_request_setup_session(struct smbcli_session *session,
-                                                   uint8_t command, uint_t wct, uint_t buflen)
+                                                   uint8_t command, uint_t wct, size_t buflen)
 {
        struct smbcli_request *req;
 
@@ -254,7 +254,7 @@ static void smbcli_req_grow_data(struct smbcli_request *req, uint_t new_size)
 */
 NTSTATUS smbcli_chained_request_setup(struct smbcli_request *req,
                                      uint8_t command, 
-                                     uint_t wct, uint_t buflen)
+                                     uint_t wct, size_t buflen)
 {
        uint_t new_size = 1 + (wct*2) + 2 + buflen;
 
index 4a569cfe66b53f7a69a809f0aa1e3a8e575d58f4..fedebf4c8d27c23513a5ff7ec3183bac85388a1d 100644 (file)
@@ -32,12 +32,12 @@ struct request_buffer {
        uint8_t *buffer;
        
        /* the size of the raw buffer, including 4 byte header */
-       uint_t size;
+       size_t size;
        
        /* how much has been allocated - on reply the buffer is over-allocated to 
           prevent too many realloc() calls 
        */
-       uint_t allocated;
+       size_t allocated;
        
        /* the start of the SMB header - this is always buffer+4 */
        uint8_t *hdr;
@@ -45,11 +45,11 @@ struct request_buffer {
        /* the command words and command word count. vwv points
           into the raw buffer */
        uint8_t *vwv;
-       uint_t wct;
+       size_t wct;
        
        /* the data buffer and size. data points into the raw buffer */
        uint8_t *data;
-       uint_t data_size;
+       size_t data_size;
        
        /* ptr is used as a moving pointer into the data area
         * of the packet. The reason its here and not a local
index a73db78f7b7aecf2ef9d6145766b2f9ef10e0203..541fd1fb8cc516ee9d12ffcb9576e219326e9be3 100644 (file)
@@ -101,7 +101,7 @@ BOOL signing_good(struct smb_signing_context *sign_info,
        return True;
 }
 
-void sign_outgoing_message(struct request_buffer *out, DATA_BLOB *mac_key, uint_t seq_num) 
+void sign_outgoing_message(struct request_buffer *out, DATA_BLOB *mac_key, unsigned int seq_num) 
 {
        uint8_t calc_md5_mac[16];
        struct MD5Context md5_ctx;
index 1f3e2f54e4f7011c394bfd9839ea3882037b3919..2476270d49a2e151254fe922a4071cd2c85eb8b5 100644 (file)
@@ -168,7 +168,7 @@ BOOL smb2_request_is_ok(struct smb2_request *req)
 /*
   check if a range in the reply body is out of bounds
 */
-BOOL smb2_oob(struct smb2_request_buffer *buf, const uint8_t *ptr, uint_t size)
+BOOL smb2_oob(struct smb2_request_buffer *buf, const uint8_t *ptr, size_t size)
 {
        /* be careful with wraparound! */
        if (ptr < buf->body ||
index ceafacf9d4036097223d988f7cf994e9dde60ffe..33df4daabecfa9bca3a0254ff483ca1c8a1eef6b 100644 (file)
@@ -75,19 +75,19 @@ struct smb2_request_buffer {
        uint8_t *buffer;
        
        /* the size of the raw buffer, including 4 byte header */
-       uint_t size;
+       size_t size;
        
        /* how much has been allocated - on reply the buffer is over-allocated to 
           prevent too many realloc() calls 
        */
-       uint_t allocated;
+       size_t allocated;
        
        /* the start of the SMB2 header - this is always buffer+4 */
        uint8_t *hdr;
        
        /* the packet body */
        uint8_t *body;
-       uint_t body_size;
+       size_t body_size;
 
        /* this point to the next dynamic byte that can be used
         * this will be moved when some dynamic data is pushed
@@ -183,7 +183,7 @@ struct smb2_request {
   check that a body has the expected size
 */
 #define SMB2_CHECK_PACKET_RECV(req, size, dynamic) do { \
-       uint_t is_size = req->in.body_size; \
+       size_t is_size = req->in.body_size; \
        uint16_t field_size = SVAL(req->in.body, 0); \
        uint16_t want_size = ((dynamic)?(size)+1:(size)); \
        if (is_size < (size)) { \
index 26d228fa6f9e81d81c345cd7644c3b10de1e1197..96fae004a4fb8915f2298d609394911dca79f4c4 100644 (file)
@@ -224,8 +224,9 @@ include/config.h:
        @echo "You need to rerun ./autogen.sh and ./configure"
        @/bin/false
 
-clean_pch: 
-       -rm -f include/includes.h.gch
+clean_pch:
+       @echo "Removing precompiled headers"
+       @-rm -f include/includes.h.gch
 
 pch: clean_pch include/includes.h.gch
 
index 9dba88b2992e477d86d104aaaa69b375a236b391..a86944656906a83781ce6384ba6224ba461cc1a5 100644 (file)
@@ -20,7 +20,8 @@ SWIG_INCLUDES = librpc/gen_ndr/samr.i librpc/gen_ndr/lsa.i librpc/gen_ndr/spools
 scripting/swig/dcerpc_wrap.c: scripting/swig/dcerpc.i scripting/swig/samba.i scripting/swig/status_codes.i $(SWIG_INCLUDES)
 
 clean::
-       -rm -f scripting/swig/tdb.pyc scripting/swig/tdb.py
+       @echo "Removing SWIG output files"
+       @-rm -f scripting/swig/tdb.pyc scripting/swig/tdb.py
 
 # Swig testing
 
index f266ab587bfbe738afea61373ea20b0e8125d1a9..3c5b8c10c7f38401900344cd43c20a08e939a8a4 100644 (file)
@@ -89,7 +89,7 @@ static void req_setup_chain_reply(struct smbsrv_request *req, uint_t wct, uint_t
   the caller will then fill in the command words and data before calling req_send_reply() to 
   send the reply on its way
 */
-void smbsrv_setup_reply(struct smbsrv_request *req, uint_t wct, uint_t buflen)
+void smbsrv_setup_reply(struct smbsrv_request *req, uint_t wct, size_t buflen)
 {
        uint16_t flags2;
 
@@ -248,7 +248,7 @@ static void req_grow_allocation(struct smbsrv_request *req, uint_t new_size)
   To cope with this req->out.ptr is supplied. This will be updated to
   point at the same offset into the packet as before this call
 */
-void req_grow_data(struct smbsrv_request *req, uint_t new_size)
+void req_grow_data(struct smbsrv_request *req, size_t new_size)
 {
        int delta;
 
@@ -364,7 +364,7 @@ void smbsrv_send_error(struct smbsrv_request *req, NTSTATUS status)
 
   if dest_len is -1 then no limit applies
 */
-size_t req_push_str(struct smbsrv_request *req, uint8_t *dest, const char *str, int dest_len, uint_t flags)
+size_t req_push_str(struct smbsrv_request *req, uint8_t *dest, const char *str, int dest_len, size_t flags)
 {
        size_t len;
        uint_t grow_size;
index 6781b6ce658c8d1ad2ca141869aa5a8cfd42ab82..46923988bb6ea5cea5636742f74b140d8b47e0af 100644 (file)
@@ -40,7 +40,7 @@ static struct smb2srv_request *smb2srv_init_request(struct smbsrv_connection *sm
        return req;
 }
 
-NTSTATUS smb2srv_setup_reply(struct smb2srv_request *req, uint_t body_fixed_size, uint_t body_dynamic_size)
+NTSTATUS smb2srv_setup_reply(struct smb2srv_request *req, uint_t body_fixed_size, size_t body_dynamic_size)
 {
        req->out.size           = SMB2_HDR_BODY+NBT_HDR_SIZE+body_fixed_size;