From 0eddf14b307e905663b95296aa695a10d3fb90f7 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 24 Apr 2006 09:36:09 +0000 Subject: r15191: Avoid uint_t as it's not standard. (This used to be commit 7af59357b94e3819415b3a9257be0ced745ce130) --- source4/lib/crypto/md5.c | 2 +- source4/lib/registry/reg_backend_w95.c | 2 +- source4/lib/util/debug.c | 2 +- source4/lib/util/pidfile.c | 10 +++++----- source4/lib/util/util.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) (limited to 'source4/lib') 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; -- cgit