forked from len0rd/rockbox
MSVC compatibility adjustments.
When using a global variable from a DLL with MSVC special handling is necessary to avoid going through additional redirection. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31640 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
e9b257f340
commit
ab49b5e77b
2 changed files with 18 additions and 0 deletions
|
@ -31,7 +31,17 @@ extern "C" {
|
||||||
/* Size of buffer for disk I/O - 8MB is large enough for any version
|
/* Size of buffer for disk I/O - 8MB is large enough for any version
|
||||||
of the Apple firmware, but not the Nano's RSRC image. */
|
of the Apple firmware, but not the Nano's RSRC image. */
|
||||||
#define BUFFER_SIZE 8*1024*1024
|
#define BUFFER_SIZE 8*1024*1024
|
||||||
|
|
||||||
|
#ifndef _MSC_VER
|
||||||
extern unsigned char* ipod_sectorbuf;
|
extern unsigned char* ipod_sectorbuf;
|
||||||
|
#else
|
||||||
|
/* MSVC needs to use dllimport to allow using it directly from a DLL.
|
||||||
|
* See http://support.microsoft.com/kb/90530
|
||||||
|
* Building with MSVC is only when using as DLL.
|
||||||
|
*/
|
||||||
|
_declspec(dllimport) unsigned char* ipod_sectorbuf;
|
||||||
|
#endif
|
||||||
|
|
||||||
extern int ipod_verbose;
|
extern int ipod_verbose;
|
||||||
|
|
||||||
#define FILETYPE_DOT_IPOD 0
|
#define FILETYPE_DOT_IPOD 0
|
||||||
|
|
|
@ -32,7 +32,15 @@ extern int sansa_verbose;
|
||||||
/* Size of buffer for disk I/O - 8MB is large enough for any version
|
/* Size of buffer for disk I/O - 8MB is large enough for any version
|
||||||
of the Apple firmware, but not the Nano's RSRC image. */
|
of the Apple firmware, but not the Nano's RSRC image. */
|
||||||
#define BUFFER_SIZE 8*1024*1024
|
#define BUFFER_SIZE 8*1024*1024
|
||||||
|
#ifndef _MSC_VER
|
||||||
extern unsigned char* sansa_sectorbuf;
|
extern unsigned char* sansa_sectorbuf;
|
||||||
|
#else
|
||||||
|
/* MSVC needs to use dllimport to allow using it directly from a DLL.
|
||||||
|
* See http://support.microsoft.com/kb/90530
|
||||||
|
* Building with MSVC is only when using as DLL.
|
||||||
|
*/
|
||||||
|
_declspec(dllimport) unsigned char* sansa_sectorbuf;
|
||||||
|
#endif
|
||||||
|
|
||||||
int sansa_read_partinfo(struct sansa_t* sansa, int silent);
|
int sansa_read_partinfo(struct sansa_t* sansa, int silent);
|
||||||
int is_sansa(struct sansa_t* sansa);
|
int is_sansa(struct sansa_t* sansa);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue