aboutsummaryrefslogtreecommitdiff
path: root/libtcc.c
diff options
context:
space:
mode:
authorgrischka <grischka>2017-02-08 19:49:28 +0100
committergrischka <grischka>2017-02-08 19:49:28 +0100
commit90316c7c26571ce1c55917aa98503ebba65d6d3a (patch)
treea87b0f6ceb8b3d54776404a58cb2d3d23ed55ab3 /libtcc.c
parent68666eee2ade45ab73b07361367d0a38d350d663 (diff)
downloadtinycc-90316c7c26571ce1c55917aa98503ebba65d6d3a.tar.gz
tinycc-90316c7c26571ce1c55917aa98503ebba65d6d3a.tar.bz2
tcc: don't use pstrcpy, fix win32 spanwn quoting
- we're now exporting tcc_prefixed symbols from libtcc only - On windows, the msvcrt startup code would remove backslashes from commandline arguments such as -DFOO=\"foo\" which would appear in argv as -DFOO="foo" Therefor before passing these to spawnvp, we need to restore the backslashes.
Diffstat (limited to 'libtcc.c')
-rw-r--r--libtcc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libtcc.c b/libtcc.c
index 11a7cf6..88a0957 100644
--- a/libtcc.c
+++ b/libtcc.c
@@ -133,7 +133,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;
@@ -153,7 +153,7 @@ PUB_FUNC char *pstrcpy(char *buf, int buf_size, const char *s)
}
/* strcat and truncate. */
-PUB_FUNC char *pstrcat(char *buf, int buf_size, const char *s)
+ST_FUNC char *pstrcat(char *buf, int buf_size, const char *s)
{
int len;
len = strlen(buf);
@@ -162,7 +162,7 @@ PUB_FUNC char *pstrcat(char *buf, int buf_size, const char *s)
return buf;
}
-PUB_FUNC char *pstrncpy(char *out, const char *in, size_t num)
+ST_FUNC char *pstrncpy(char *out, const char *in, size_t num)
{
memcpy(out, in, num);
out[num] = '\0';
@@ -1157,7 +1157,7 @@ PUB_FUNC int tcc_add_library_err(TCCState *s, const char *libname)
{
int ret = tcc_add_library(s, libname);
if (ret < 0)
- tcc_error_noabort("library 'lib%s' not found", libname);
+ tcc_error_noabort("library '%s' not found", libname);
return ret;
}