initial
This commit is contained in:
37
vnproglib/c/include/vn/util/compiler.h
Normal file
37
vnproglib/c/include/vn/util/compiler.h
Normal file
@ -0,0 +1,37 @@
|
||||
#ifndef _VN_UTIL_COMPILER_H
|
||||
#define _VN_UTIL_COMPILER_H
|
||||
|
||||
/* This header provides some simple checks for various features supported by the
|
||||
* current compiler. */
|
||||
|
||||
/* Determine the level of standard C support. */
|
||||
#if __STDC__
|
||||
#if defined (__STDC_VERSION__)
|
||||
#if (__STDC_VERSION__ >= 199901L)
|
||||
#define C99
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Determine if the compiler has stdbool.h. */
|
||||
#if defined(C99) || _MSC_VER >= 1800
|
||||
#define VN_HAVE_STDBOOL_H 1
|
||||
#else
|
||||
#define VN_HAVE_STDBOOL_H 0
|
||||
#endif
|
||||
|
||||
/* Determine if the secure CRT is available. */
|
||||
#if defined(_MSC_VER)
|
||||
#define VN_HAVE_SECURE_CRT 1
|
||||
#else
|
||||
#define VN_HAVE_SECURE_CRT 0
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/* Determine if the generic type math library (tgmath.h) is available. */
|
||||
#if defined(C99)
|
||||
#define VN_HAVE_GENERIC_TYPE_MATH 1
|
||||
#else
|
||||
#define VN_HAVE_GENERIC_TYPE_MATH 0
|
||||
#endif
|
||||
16
vnproglib/c/include/vn/util/export.h
Normal file
16
vnproglib/c/include/vn/util/export.h
Normal file
@ -0,0 +1,16 @@
|
||||
#ifndef VNEXPORT_H_INCLUDED
|
||||
#define VNEXPORT_H_INCLUDED
|
||||
|
||||
/* Not only does this have to be windows to use __declspec */
|
||||
/* it also needs to actually be outputting a DLL */
|
||||
#if defined _WINDOWS && defined _WINDLL
|
||||
#if proglib_c_EXPORTS
|
||||
#define DllExport __declspec(dllexport)
|
||||
#else
|
||||
#define DllExport __declspec(dllimport)
|
||||
#endif
|
||||
#else
|
||||
#define DllExport
|
||||
#endif
|
||||
|
||||
#endif
|
||||
19
vnproglib/c/include/vn/util/port.h
Normal file
19
vnproglib/c/include/vn/util/port.h
Normal file
@ -0,0 +1,19 @@
|
||||
#ifndef VNPORT_H_INCLUDED
|
||||
#define VNPORT_H_INCLUDED
|
||||
|
||||
/** Basic portability measures. */
|
||||
|
||||
/** VNAPI - DLL linkage specifier. */
|
||||
#ifdef _MSC_VER
|
||||
#if VN_LINKED_AS_SHARED_LIBRARY
|
||||
#define VNAPI __declspec(dllimport)
|
||||
#elif VN_CREATE_SHARED_LIBRARY
|
||||
#define VNAPI __declspec(dllexport)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef VNAPI
|
||||
#define VNAPI
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user