summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2009-02-01 20:54:44 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2009-02-01 20:54:44 +0100
commitc4f158b6ffc7460b036abf233131e22a0daaf8d8 (patch)
treea16c6190273abb887600ce64de6945d090ffdad5 /src
parentfe300381a64405ebfa8c9eb5a45cefe24515d20c (diff)
Fix some missing headers for cygwin
Diffstat (limited to 'src')
-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
7 files changed, 21 insertions, 15 deletions
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