diff options
| author | Jean-Claude Beaudoin <jean.claude.beaudoin@gmail.com> | 2016-09-27 01:43:40 -0400 |
|---|---|---|
| committer | Jean-Claude Beaudoin <jean.claude.beaudoin@gmail.com> | 2016-09-27 01:43:40 -0400 |
| commit | 889ee28ed562af4344cba27f17076c88ec099c74 (patch) | |
| tree | ff11a61c7bd3bb1b7e0eb10ed7b17f0e8427369d | |
| parent | 08335c1548c015ccbdaebcd3dae27d94a48d182a (diff) | |
| download | tinycc-889ee28ed562af4344cba27f17076c88ec099c74.tar.gz tinycc-889ee28ed562af4344cba27f17076c88ec099c74.tar.bz2 | |
Rein in unintended external functions on Windows.
| -rw-r--r-- | libtcc.c | 4 | ||||
| -rw-r--r-- | tcc.h | 2 | ||||
| -rw-r--r-- | tccpe.c | 2 | ||||
| -rw-r--r-- | win32/tools/tiny_impdef.c | 4 |
4 files changed, 7 insertions, 5 deletions
@@ -117,7 +117,7 @@ static void tcc_add_systemdir(TCCState *s) #endif #ifndef CONFIG_TCC_STATIC -void dlclose(void *p) +static void dlclose(void *p) { FreeLibrary((HMODULE)p); } @@ -135,7 +135,7 @@ BOOL WINAPI DllMain (HINSTANCE hDll, DWORD dwReason, LPVOID lpReserved) /********************************************************/ /* copy a string and truncate it. */ -PUB_FUNC char *pstrcpy(char *buf, int buf_size, const char *s) +ST_FUNC char *pstrcpy(char *buf, int buf_size, const char *s) { char *q, *q_end; int c; @@ -1167,7 +1167,7 @@ ST_DATA struct TCCState *tcc_state; #define AFF_PREPROCESS 0x0004 /* preprocess file */ /* public functions currently used by the tcc main function */ -PUB_FUNC char *pstrcpy(char *buf, int buf_size, const char *s); +ST_FUNC char *pstrcpy(char *buf, int buf_size, const char *s); ST_FUNC char *pstrcat(char *buf, int buf_size, const char *s); ST_FUNC char *pstrncpy(char *out, const char *in, size_t num); PUB_FUNC char *tcc_basename(const char *name); @@ -58,6 +58,7 @@ #endif +#if 0 #ifdef _WIN32 void dbg_printf (const char *fmt, ...) { @@ -70,6 +71,7 @@ void dbg_printf (const char *fmt, ...) OutputDebugString(buffer); } #endif +#endif /* ----------------------------------------------------------- */ #ifndef IMAGE_NT_SIGNATURE diff --git a/win32/tools/tiny_impdef.c b/win32/tools/tiny_impdef.c index 48de44f..b6debe6 100644 --- a/win32/tools/tiny_impdef.c +++ b/win32/tools/tiny_impdef.c @@ -28,7 +28,7 @@ #include <io.h> #include <malloc.h> -char *get_export_names(int fd); +static char *get_export_names(int fd); #define tcc_free free #define tcc_realloc realloc @@ -169,7 +169,7 @@ int read_mem(int fd, unsigned offset, void *buffer, unsigned len) /* -------------------------------------------------------------- */ #endif -char *get_export_names(int fd) +static char *get_export_names(int fd) { int l, i, n, n0; char *p; |
