Fix checkwps by using host system's file IO (thanks to r25843/r25844) and by including a work around for systems that try to get intN_t via sys/types.h (which should be wrong, but well).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25854 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thomas Martitz 2010-05-06 21:49:09 +00:00
parent 77dfff5a55
commit 3e400b2ae6
2 changed files with 10 additions and 3 deletions

View file

@ -22,12 +22,15 @@
#ifndef _FILE_H_
#define _FILE_H_
#include <sys/types.h>
#include "_ansi.h"
#undef MAX_PATH /* this avoids problems when building simulator */
#define MAX_PATH 260
#ifdef __PCTOOL__
#include <fcntl.h>
#else
#include <sys/types.h>
#include "_ansi.h"
#define MAX_OPEN_FILES 11
#ifndef SEEK_SET
@ -97,3 +100,4 @@ extern off_t filesize(int fd);
extern int release_files(int volume);
int fdprintf (int fd, const char *fmt, ...) ATTRIBUTE_PRINTF(2, 3);
#endif
#endif

View file

@ -30,6 +30,9 @@
/*
* include string.h for size_t for convinence */
#include <string.h>
/* make some (debian, ubuntu...) systems happy that inappropriately include
* sys/types.h to get intN_t ... */
#include <inttypes.h>
#if !defined(__ssize_t_defined) && !defined(_SSIZE_T_) && !defined(ssize_t) && !defined(_SSIZE_T_DECLARED)
#define __ssize_t_defined