mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-04-04 08:51:39 +00:00
Make it valid C++ code, such that it can compile as C++ code.
This commit is contained in:
parent
50d165e173
commit
f53502c9ca
4 changed files with 4 additions and 4 deletions
2
ansi.c
2
ansi.c
|
@ -52,7 +52,7 @@ const char *platform_tmpnam(char *str) {
|
|||
return tmpnam(str);
|
||||
}
|
||||
|
||||
const char *platform_getenv(char *var) {
|
||||
const char *platform_getenv(const char *var) {
|
||||
return getenv(var);
|
||||
}
|
||||
|
||||
|
|
2
msvc.c
2
msvc.c
|
@ -80,7 +80,7 @@ const char *platform_tmpnam(char *str) {
|
|||
return tmpnam_s(str, L_tmpnam);
|
||||
}
|
||||
|
||||
const char *platform_getenv(char *var) {
|
||||
const char *platform_getenv(const char *var) {
|
||||
char *buffer = (char *)platform_mem_allocate(GETENV_BUFFER);
|
||||
size_t size;
|
||||
getenv_s(&size, buffer, GETENV_BUFFER, var);
|
||||
|
|
2
opts.c
2
opts.c
|
@ -60,7 +60,7 @@ opts_cmd_t opts; /* command line options */
|
|||
static void opts_setdefault(void) {
|
||||
memset(&opts, 0, sizeof(opts_cmd_t));
|
||||
OPTS_OPTION_BOOL(OPTION_CORRECTION) = true;
|
||||
OPTS_OPTION_STR(OPTION_PROGSRC) = "progs.src";
|
||||
OPTS_OPTION_STR(OPTION_PROGSRC) = (char*)"progs.src";
|
||||
|
||||
/* warnings */
|
||||
opts_set(opts.warn, WARN_UNUSED_VARIABLE, true);
|
||||
|
|
|
@ -216,7 +216,7 @@ const char *platform_tmpnam(char *str);
|
|||
* pointer. The return value is *NULL* if `var` is not found in the
|
||||
* enviroment table.
|
||||
*/
|
||||
const char *platform_getenv(char *var);
|
||||
const char *platform_getenv(const char *var);
|
||||
|
||||
/*
|
||||
* Function: platform_vasprintf
|
||||
|
|
Loading…
Reference in a new issue