Skip to content
Snippets Groups Projects
Commit 25937c30 authored by Frederich Munch's avatar Frederich Munch Committed by Axel Naumann
Browse files

Fix setenv declaration for gcc on OS X.

parent 00448b56
No related branches found
No related tags found
No related merge requests found
...@@ -11,20 +11,15 @@ ...@@ -11,20 +11,15 @@
extern "C" int cling_testlibrary_function(); extern "C" int cling_testlibrary_function();
// For gcc setenv #ifndef _WIN32
#ifndef __THROW #include <stdlib.h>
#define __THROW #else
#endif extern "C" int _putenv_s(const char *name, const char *value);
extern "C" int setenv(const char *name, const char *value, int overwrite) __THROW;
extern "C" int _putenv_s(const char *name, const char *value);
static void setup() {
#ifdef _WIN32
#define setenv(n, v, o) _putenv_s(n,v) #define setenv(n, v, o) _putenv_s(n,v)
#endif #endif
::setenv("ENVVAR_INC", ENVVAR_INC, 1);
::setenv("ENVVAR_LIB", ENVVAR_LIB, 1); ::setenv("ENVVAR_INC", ENVVAR_INC, 1);
} ::setenv("ENVVAR_LIB", ENVVAR_LIB, 1);
setup();
#pragma cling add_include_path("$ENVVAR_INC") #pragma cling add_include_path("$ENVVAR_INC")
#include "Include_header.h" #include "Include_header.h"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment