File: test_config.h.in

package info (click to toggle)
sdformat 4.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,492 kB
  • ctags: 6,349
  • sloc: cpp: 26,300; python: 1,633; ruby: 217; ansic: 79; sh: 77; makefile: 18
file content (26 lines) | stat: -rw-r--r-- 623 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#define PROJECT_SOURCE_PATH "${PROJECT_SOURCE_DIR}"
#define PROJECT_BINARY_DIR  "${CMAKE_BINARY_DIR}"
#define SDF_PROTOCOL_VERSION "${SDF_PROTOCOL_VERSION}"

/* 
 * setenv/unstenv are not present in Windows. Define them to make the code
 * portable 
 */
#if (_MSC_VER >= 1400) // Visual Studio 2005
#include <sstream>

int setenv(const char * name, const char * value, int /*rewrite*/)
{
  std::stringstream sstr;
  sstr << *name << '=' << value;
  return _putenv(sstr.str().c_str());
}

void unsetenv(const char * name)
{
  std::stringstream sstr;
  sstr << *name << '=';
  _putenv(sstr.str().c_str());
  return;
}
#endif