summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/client/client.c2
-rw-r--r--source4/lib/crypto/md5.c2
-rw-r--r--source4/lib/registry/reg_backend_w95.c2
-rw-r--r--source4/lib/util/debug.c2
-rw-r--r--source4/lib/util/pidfile.c10
-rw-r--r--source4/lib/util/util.c4
-rw-r--r--source4/libcli/raw/raweas.c4
-rw-r--r--source4/libcli/raw/rawnotify.c2
-rw-r--r--source4/libcli/raw/rawrequest.c6
-rw-r--r--source4/libcli/raw/request.h8
-rw-r--r--source4/libcli/raw/smb_signing.c2
-rw-r--r--source4/libcli/smb2/request.c2
-rw-r--r--source4/libcli/smb2/smb2.h8
-rw-r--r--source4/main.mk5
-rw-r--r--source4/scripting/swig/config.mk3
-rw-r--r--source4/smb_server/smb/request.c6
-rw-r--r--source4/smb_server/smb2/receive.c2
17 files changed, 36 insertions, 34 deletions
diff --git a/source4/client/client.c b/source4/client/client.c
index 4e84987b40..328fd8d853 100644
--- a/source4/client/client.c
+++ b/source4/client/client.c
@@ -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;
}
diff --git a/source4/lib/crypto/md5.c b/source4/lib/crypto/md5.c
index b607e93842..584c46ef2d 100644
--- a/source4/lib/crypto/md5.c
+++ b/source4/lib/crypto/md5.c
@@ -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;
diff --git a/source4/lib/registry/reg_backend_w95.c b/source4/lib/registry/reg_backend_w95.c
index d5ce0e33f8..1d3781c583 100644
--- a/source4/lib/registry/reg_backend_w95.c
+++ b/source4/lib/registry/reg_backend_w95.c
@@ -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 {
diff --git a/source4/lib/util/debug.c b/source4/lib/util/debug.c
index fa781c823a..9084c2b406 100644
--- a/source4/lib/util/debug.c
+++ b/source4/lib/util/debug.c
@@ -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",
diff --git a/source4/lib/util/pidfile.c b/source4/lib/util/pidfile.c
index 1a46e6e70c..dc9ecafae9 100644
--- a/source4/lib/util/pidfile.c
+++ b/source4/lib/util/pidfile.c
@@ -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)));
diff --git a/source4/lib/util/util.c b/source4/lib/util/util.c
index b7293c0092..0354d17097 100644
--- a/source4/lib/util/util.c
+++ b/source4/lib/util/util.c
@@ -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;
diff --git a/source4/libcli/raw/raweas.c b/source4/libcli/raw/raweas.c
index 4c609aa593..26b04838d6 100644
--- a/source4/libcli/raw/raweas.c
+++ b/source4/libcli/raw/raweas.c
@@ -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;
diff --git a/source4/libcli/raw/rawnotify.c b/source4/libcli/raw/rawnotify.c
index 8ae5098c01..f4d4164016 100644
--- a/source4/libcli/raw/rawnotify.c
+++ b/source4/libcli/raw/rawnotify.c
@@ -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;
diff --git a/source4/libcli/raw/rawrequest.c b/source4/libcli/raw/rawrequest.c
index 24390cd9e7..f042c7b581 100644
--- a/source4/libcli/raw/rawrequest.c
+++ b/source4/libcli/raw/rawrequest.c
@@ -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;
diff --git a/source4/libcli/raw/request.h b/source4/libcli/raw/request.h
index 4a569cfe66..fedebf4c8d 100644
--- a/source4/libcli/raw/request.h
+++ b/source4/libcli/raw/request.h
@@ -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
diff --git a/source4/libcli/raw/smb_signing.c b/source4/libcli/raw/smb_signing.c
index a73db78f7b..541fd1fb8c 100644
--- a/source4/libcli/raw/smb_signing.c
+++ b/source4/libcli/raw/smb_signing.c
@@ -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;
diff --git a/source4/libcli/smb2/request.c b/source4/libcli/smb2/request.c
index 1f3e2f54e4..2476270d49 100644
--- a/source4/libcli/smb2/request.c
+++ b/source4/libcli/smb2/request.c
@@ -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 ||
diff --git a/source4/libcli/smb2/smb2.h b/source4/libcli/smb2/smb2.h
index ceafacf9d4..33df4daabe 100644
--- a/source4/libcli/smb2/smb2.h
+++ b/source4/libcli/smb2/smb2.h
@@ -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)) { \
diff --git a/source4/main.mk b/source4/main.mk
index 26d228fa6f..96fae004a4 100644
--- a/source4/main.mk
+++ b/source4/main.mk
@@ -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
diff --git a/source4/scripting/swig/config.mk b/source4/scripting/swig/config.mk
index 9dba88b299..a869446569 100644
--- a/source4/scripting/swig/config.mk
+++ b/source4/scripting/swig/config.mk
@@ -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
diff --git a/source4/smb_server/smb/request.c b/source4/smb_server/smb/request.c
index f266ab587b..3c5b8c10c7 100644
--- a/source4/smb_server/smb/request.c
+++ b/source4/smb_server/smb/request.c
@@ -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;
diff --git a/source4/smb_server/smb2/receive.c b/source4/smb_server/smb2/receive.c
index 6781b6ce65..46923988bb 100644
--- a/source4/smb_server/smb2/receive.c
+++ b/source4/smb_server/smb2/receive.c
@@ -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;