summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--src/common.c3
-rw-r--r--src/dir.c3
-rw-r--r--src/file_dxf.c4
-rw-r--r--src/file_gz.c8
-rw-r--r--src/phrecn.c7
-rw-r--r--src/ppartsel.c4
-rw-r--r--src/win32.c7
8 files changed, 22 insertions, 16 deletions
diff --git a/configure.ac b/configure.ac
index a8de0ca..95ccbe6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -248,7 +248,7 @@ AC_SYS_LARGEFILE
AC_HEADER_STDC
#AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h stdint.h unistd.h])
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([byteswap.h curses.h cygwin/fs.h cygwin/version.h dal/file_dal.h dal/file.h ddk/ntddstor.h dirent.h endian.h errno.h fcntl.h features.h giconv.h glob.h iconv.h io.h libgen.h limits.h linux/fs.h linux/hdreg.h linux/types.h locale.h machine/endian.h ncurses.h ncurses/curses.h ncurses/ncurses.h ncursesw/ncurses.h ntfs/version.h openssl/md5.h openssl/opensslv.h pwd.h scsi/scsi.h scsi/scsi_ioctl.h scsi/sg.h setjmp.h signal.h stdarg.h sys/cygwin.h sys/disk.h sys/disklabel.h sys/dkio.h sys/endian.h sys/ioctl.h sys/param.h sys/select.h sys/time.h sys/utsname.h sys/vtoc.h time.h utime.h varargs.h w32api/ddk/ntdddisk.h windef.h windows.h zlib.h])
+AC_CHECK_HEADERS([byteswap.h curses.h cygwin/fs.h cygwin/version.h dal/file_dal.h dal/file.h ddk/ntddstor.h dirent.h endian.h errno.h fcntl.h features.h giconv.h glob.h iconv.h io.h libgen.h limits.h linux/fs.h linux/hdreg.h linux/types.h locale.h machine/endian.h malloc.h ncurses.h ncurses/curses.h ncurses/ncurses.h ncursesw/ncurses.h ntfs/version.h openssl/md5.h openssl/opensslv.h pwd.h scsi/scsi.h scsi/scsi_ioctl.h scsi/sg.h setjmp.h signal.h stdarg.h sys/cygwin.h sys/disk.h sys/disklabel.h sys/dkio.h sys/endian.h sys/ioctl.h sys/param.h sys/select.h sys/time.h sys/utsname.h sys/vtoc.h time.h utime.h varargs.h w32api/ddk/ntdddisk.h windef.h windows.h zlib.h])
#--------------------------------------------------------------------
# Check for iconv support (for Unicode conversion).
diff --git a/src/common.c b/src/common.c
index ab20166..0fe3738 100644
--- a/src/common.c
+++ b/src/common.c
@@ -29,6 +29,9 @@
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
#include <stdarg.h>
#include "types.h"
#include "common.h"
diff --git a/src/dir.c b/src/dir.c
index 92d40ea..0d398bc 100644
--- a/src/dir.c
+++ b/src/dir.c
@@ -40,6 +40,9 @@
#include <utime.h>
#endif
#include <errno.h>
+#ifdef HAVE_IO_H
+#include <io.h>
+#endif
#include "common.h"
#include "fat.h"
#include "lang.h"
diff --git a/src/file_dxf.c b/src/file_dxf.c
index 556191a..3c62503 100644
--- a/src/file_dxf.c
+++ b/src/file_dxf.c
@@ -55,11 +55,11 @@ const file_hint_t file_hint_dxf= {
static const unsigned char header_dxflib[10]= {'9', '9', '9', '\n',
'd', 'x', 'f', 'l', 'i', 'b'};
-static const unsigned char header_dxflib_dos[10]= {'9', '9', '9', '\r', '\n',
+static const unsigned char header_dxflib_dos[11]= {'9', '9', '9', '\r', '\n',
'd', 'x', 'f', 'l', 'i', 'b'};
static const unsigned char header_dxf[11]= {' ', ' ', '0', '\n',
'S', 'E', 'C', 'T', 'I', 'O', 'N'};
-static const unsigned char header_dxf_dos[11]= {' ', ' ', '0', '\r', '\n',
+static const unsigned char header_dxf_dos[12]= {' ', ' ', '0', '\r', '\n',
'S', 'E', 'C', 'T', 'I', 'O', 'N'};
static void register_header_check_dxf(file_stat_t *file_stat)
diff --git a/src/file_gz.c b/src/file_gz.c
index a4155f3..6799337 100644
--- a/src/file_gz.c
+++ b/src/file_gz.c
@@ -96,11 +96,15 @@ static int header_check_gz(const unsigned char *buffer, const unsigned int buffe
}
if((flags&GZ_FNAME)!=0)
{
- while(off<buffer_size && buffer[off++]!='\0');
+ while(off<buffer_size && buffer[off++]!='\0')
+ {
+ }
}
if((flags&GZ_FCOMMENT)!=0)
{
- while(off<buffer_size && buffer[off++]!='\0');
+ while(off<buffer_size && buffer[off++]!='\0')
+ {
+ }
}
if((flags&GZ_FHCRC)!=0)
{
diff --git a/src/phrecn.c b/src/phrecn.c
index 38ff73e..1fea2fa 100644
--- a/src/phrecn.c
+++ b/src/phrecn.c
@@ -48,6 +48,13 @@
#include <stdio.h>
#endif
#include <errno.h>
+#ifdef HAVE_WINDEF_H
+#include <windef.h>
+#endif
+#ifdef HAVE_WINBASE_H
+#include <stdarg.h>
+#include <winbase.h>
+#endif
#include "fnctdsk.h"
#include "dir.h"
#include "fat_dir.h"
diff --git a/src/ppartsel.c b/src/ppartsel.c
index 672b0c2..48cb12d 100644
--- a/src/ppartsel.c
+++ b/src/ppartsel.c
@@ -33,11 +33,7 @@
#include "types.h"
#include "common.h"
#include "intrf.h"
-#ifdef HAVE_NCURSES
-#include "intrfn.h"
-#else
#include <stdio.h>
-#endif
#include "fnctdsk.h"
#include "dir.h"
#include "list.h"
diff --git a/src/win32.c b/src/win32.c
index 21f8ece..5275de2 100644
--- a/src/win32.c
+++ b/src/win32.c
@@ -38,13 +38,6 @@
#include <winbase.h>
#endif
#include <ctype.h> /* isspace */
-#ifdef HAVE_WINDEF_H
-#include <windef.h>
-#endif
-#ifdef HAVE_WINBASE_H
-#include <stdarg.h>
-#include <winbase.h>
-#endif
#ifdef HAVE_WINIOCTL_H
#include <winioctl.h>
#endif