COMP: Fix warnings on Borland dashboards...

This commit is contained in:
David Cole 2006-05-23 12:38:22 -04:00
parent 35334d01cd
commit 13a68cd978
6 changed files with 20 additions and 8 deletions

View File

@ -67,6 +67,7 @@ FOREACH(file
"ctype.h" "ctype.h"
"fnmatch.h" "fnmatch.h"
"inttypes.h" "inttypes.h"
"io.h"
"libgen.h" "libgen.h"
"memory.h" "memory.h"
"sys/mkdev.h" "sys/mkdev.h"

View File

@ -31,7 +31,8 @@
#ifdef HAVE_UNISTD_H #ifdef HAVE_UNISTD_H
# include <unistd.h> # include <unistd.h>
#endif #endif
#ifdef _MSC_VER
#ifdef HAVE_IO_H
# include <io.h> # include <io.h>
#endif #endif

View File

@ -70,11 +70,7 @@ static char rcsid[] = "$OpenBSD: fnmatch.c,v 1.6 1998/03/19 00:29:59 millert Exp
#define RANGE_NOMATCH 0 #define RANGE_NOMATCH 0
#define RANGE_ERROR (-1) #define RANGE_ERROR (-1)
#ifdef NO_IBM_COMPILER_HORKAGE
static int rangematch (const char *, char, int, char **); static int rangematch (const char *, char, int, char **);
#else
static int rangematch ();
#endif
int int
fnmatch(pattern, string, flags) fnmatch(pattern, string, flags)
@ -195,7 +191,8 @@ rangematch(pattern, test, flags, newp)
* consistency with the regular expression syntax. * consistency with the regular expression syntax.
* J.T. Conklin (conklin@ngai.kaleida.com) * J.T. Conklin (conklin@ngai.kaleida.com)
*/ */
if ((negate = (*pattern == '!' || *pattern == '^'))) negate = (*pattern == '!' || *pattern == '^');
if (negate)
++pattern; ++pattern;
if (flags & FNM_CASEFOLD) if (flags & FNM_CASEFOLD)

View File

@ -30,6 +30,9 @@
/* Define to 1 if you have the <inttypes.h> header file. */ /* Define to 1 if you have the <inttypes.h> header file. */
#cmakedefine HAVE_INTTYPES_H @HAVE_INTTYPES_H@ #cmakedefine HAVE_INTTYPES_H @HAVE_INTTYPES_H@
/* Define to 1 if you have the <io.h> header file. */
#cmakedefine HAVE_IO_H @HAVE_IO_H@
/* Define to 1 if you have the `lchown' function. */ /* Define to 1 if you have the `lchown' function. */
#cmakedefine HAVE_LCHOWN @HAVE_LCHOWN@ #cmakedefine HAVE_LCHOWN @HAVE_LCHOWN@

View File

@ -470,11 +470,13 @@ tar_extract_hardlink(TAR * t, char *realname)
return -1; return -1;
} }
#ifndef WIN32
if (pathname) if (pathname)
{ {
free(pathname); free(pathname);
} }
return 0; return 0;
#endif
} }
@ -545,11 +547,13 @@ tar_extract_symlink(TAR *t, char *realname)
return -1; return -1;
} }
#ifndef WIN32
if (pathname) if (pathname)
{ {
free(pathname); free(pathname);
} }
return 0; return 0;
#endif
} }
@ -620,11 +624,13 @@ tar_extract_chardev(TAR *t, char *realname)
return -1; return -1;
} }
#ifndef WIN32
if (pathname) if (pathname)
{ {
free(pathname); free(pathname);
} }
return 0; return 0;
#endif
} }
@ -694,11 +700,13 @@ tar_extract_blockdev(TAR *t, char *realname)
return -1; return -1;
} }
#ifndef WIN32
if (pathname) if (pathname)
{ {
free(pathname); free(pathname);
} }
return 0; return 0;
#endif
} }
@ -867,9 +875,11 @@ tar_extract_fifo(TAR *t, char *realname)
return -1; return -1;
} }
#ifndef WIN32
if (pathname) if (pathname)
{ {
free(pathname); free(pathname);
} }
return 0; return 0;
#endif
} }

View File

@ -24,7 +24,7 @@
# include <stdlib.h> # include <stdlib.h>
#endif #endif
#if defined ( _MSC_VER) || defined(__WATCOMC__) #ifdef HAVE_IO_H
#include <io.h> #include <io.h>
//Yogi: hack. this should work on windows where there is no O_ACCMODE defined //Yogi: hack. this should work on windows where there is no O_ACCMODE defined
#ifndef O_ACCMODE #ifndef O_ACCMODE