forked from len0rd/rockbox
ipodpatcher: guard platform specific files.
Use the preprocessor to make platform specific files compile as empty files if built for a different platform. This removes the need to distinguish in the Makefile and simplifies creating a libipodpatcher. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31169 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
f83a3d0ac4
commit
e23adb5386
3 changed files with 10 additions and 0 deletions
|
@ -19,6 +19,7 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if !defined(_WIN32) /* all non-Windows platforms are considered POSIX. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
@ -388,3 +389,5 @@ ssize_t ipod_write(struct ipod_t* ipod, unsigned char* buf, int nbytes)
|
|||
return write(ipod->dh, buf, nbytes);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <windows.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
|
@ -119,3 +120,5 @@ int ipod_scsi_inquiry(struct ipod_t* ipod, int page_code,
|
|||
return -1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(_WIN32)
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
@ -201,3 +203,5 @@ ssize_t ipod_write(struct ipod_t* ipod, unsigned char* buf, int nbytes)
|
|||
return count;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue