From dd255b427515d0f22695185bd78c16bc58de6c09 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 15 Feb 2008 11:39:25 +0100 Subject: Fix compiling torture/smbiconv.c: allow to use realloc directly by #undef realloc. Michael (This used to be commit 113377a7929975bf29c2cfff1652781fae24e826) --- source3/torture/smbiconv.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/torture/smbiconv.c') diff --git a/source3/torture/smbiconv.c b/source3/torture/smbiconv.c index 05a8c3d815..c4d30164e4 100644 --- a/source3/torture/smbiconv.c +++ b/source3/torture/smbiconv.c @@ -21,6 +21,7 @@ */ #include "includes.h" +#undef realloc static int process_block (smb_iconv_t cd, const char *addr, size_t len, FILE *output) -- cgit From 8a63e1322581f0adf842d92b8e57919dab7d459b Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 15 Feb 2008 13:11:41 +0100 Subject: Try to fix the build of smbiconv on systems without native iconv. Use the smb_iconv_t instead of iconv_t. Michael (This used to be commit bdc00a05b95a7a629a6cbf2af21760b6ff874bd9) --- source3/torture/smbiconv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/torture/smbiconv.c') diff --git a/source3/torture/smbiconv.c b/source3/torture/smbiconv.c index c4d30164e4..ad4d6b26cc 100644 --- a/source3/torture/smbiconv.c +++ b/source3/torture/smbiconv.c @@ -86,7 +86,7 @@ incomplete character or shift sequence at end of buffer")); static int -process_fd (iconv_t cd, int fd, FILE *output) +process_fd (smb_iconv_t cd, int fd, FILE *output) { /* we have a problem with reading from a descriptor since we must not provide the iconv() function an incomplete character or shift -- cgit From a10e6183aa05f26583dfe0fc7037d9190b57a69d Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 15 Feb 2008 13:12:38 +0100 Subject: Fix two const warnings. Michael (This used to be commit 03db3bd0774e0435089eef15f88355133149d658) --- source3/torture/smbiconv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/torture/smbiconv.c') diff --git a/source3/torture/smbiconv.c b/source3/torture/smbiconv.c index ad4d6b26cc..6e609aa851 100644 --- a/source3/torture/smbiconv.c +++ b/source3/torture/smbiconv.c @@ -168,8 +168,8 @@ process_fd (smb_iconv_t cd, int fd, FILE *output) int main(int argc, char *argv[]) { const char *file = NULL; - char *from = ""; - char *to = ""; + const char *from = ""; + const char *to = ""; char *output = NULL; const char *preload_modules[] = {NULL, NULL}; FILE *out = stdout; -- cgit From d4123ba9ee7ec59331cffb846d9c82dce3d84d0d Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 15 Feb 2008 13:14:20 +0100 Subject: Fix a pointer to int conversion warning: cast the int instead. Michael (This used to be commit 3cace4b7aa87a2f5bc7b6efd095366699d939511) --- source3/torture/smbiconv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/torture/smbiconv.c') diff --git a/source3/torture/smbiconv.c b/source3/torture/smbiconv.c index 6e609aa851..72fbdc470f 100644 --- a/source3/torture/smbiconv.c +++ b/source3/torture/smbiconv.c @@ -214,7 +214,7 @@ int main(int argc, char *argv[]) } cd = smb_iconv_open(to, from); - if((int)cd == -1) { + if (cd == (smb_iconv_t)-1) { DEBUG(0,("unable to find from or to encoding, exiting...\n")); return 1; } -- cgit