1
0
forked from 0ad/0ad

fixes: (after testing on other machine)

- add newly added dirs to premake.lua
- self_test is in lowlevel project and thus doesn't have cxxtest include
path set => must not include self_test.h
- wposix: make each _CRTIMP declaration extern "C" (can't rely on
definition of _CRTIMP, nor that the header is wrapped in extern "C" {})

This was SVN commit r4730.
This commit is contained in:
janwas 2007-01-01 22:54:42 +00:00
parent 1df436f07f
commit ebfd7910cf
4 changed files with 6 additions and 5 deletions

View File

@ -326,6 +326,7 @@ function setup_all_libs ()
source_dirs = {
"lib",
"lib/posix",
"lib/sysdep",
"lib/res",
"lib/res/file",
@ -347,7 +348,7 @@ function setup_all_libs ()
sysdep_dirs = {
linux = { "lib/sysdep/unix" },
-- note: RC file must be added to main_exe package.
windows = { "lib/sysdep/win" },
windows = { "lib/sysdep/win", "lib/sysdep/win/wposix" },
macosx = { "lib/sysdep/osx" },
}
tinsert(package.files, sourcesfromdirs(source_root, sysdep_dirs[OS]));

View File

@ -90,7 +90,7 @@ extern int close(int);
extern int read (int fd, void* buf, size_t nbytes); // thunk
extern int write(int fd, void* buf, size_t nbytes); // thunk
extern _CRTIMP off_t lseek(int fd, off_t ofs, int whence);
extern "C" _CRTIMP off_t lseek(int fd, off_t ofs, int whence);
//

View File

@ -89,8 +89,8 @@ extern char* realpath(const char*, char*);
// hence, the file is reported executable if it exists.
#define X_OK 0
extern _CRTIMP int access(const char*, int);
extern "C" _CRTIMP int access(const char*, int);
extern _CRTIMP int rmdir(const char*);
extern "C" _CRTIMP int rmdir(const char*);
#endif // #ifndef INCLUDED_WFILESYSTEM

View File

@ -17,7 +17,7 @@
// is a last resort (e.g. if the regular CRT headers would conflict).
#ifndef _CRTIMP
# ifdef _DLL
# define _CRTIMP extern "C" __declspec(dllimport)
# define _CRTIMP __declspec(dllimport)
# else
# define _CRTIMP
# endif