Fix some missing headers for cygwin

This commit is contained in:
Christophe Grenier 2009-02-01 20:54:44 +01:00
parent fe300381a6
commit c4f158b6ff
8 changed files with 22 additions and 16 deletions

View file

@ -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).

View file

@ -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"

View file

@ -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"

View file

@ -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)

View file

@ -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)
{

View file

@ -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"

View file

@ -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"

View file

@ -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