Make it valid C++ code, such that it can compile as C++ code.

This commit is contained in:
Dale Weiler 2013-10-16 19:54:21 -04:00
parent 50d165e173
commit f53502c9ca
4 changed files with 4 additions and 4 deletions

2
ansi.c
View file

@ -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
View file

@ -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
View file

@ -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);

View file

@ -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