Skip to content
Snippets Groups Projects
Commit 9df33348 authored by Konstantin Osipov's avatar Konstantin Osipov
Browse files

clang-build: review fixes.

parent a991af29
No related branches found
No related tags found
No related merge requests found
......@@ -46,10 +46,10 @@ endif()
if (CMAKE_COMPILER_IS_GNUCC)
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
OUTPUT_VARIABLE GCC_VERSION)
if (GCC_VERSION VERSION_GREATER 4.6 OR GCC_VERSION VERSION_EQUAL 4.1)
message(STATUS "GCC Version >= 4.6 -- ${GCC_VERSION}")
if (GCC_VERSION VERSION_GREATER 4.1 OR GCC_VERSION VERSION_EQUAL 4.1)
message(STATUS "GCC Version >= 4.1 -- ${GCC_VERSION}")
else()
message (FATAL_ERROR "GCC version should be >= 4.6 -- ${GCC_VERSION}")
message (FATAL_ERROR "GCC version should be >= 4.1 -- ${GCC_VERSION}")
endif()
endif()
......
......@@ -25,12 +25,8 @@ read http://www.purposeful.co.uk/tfl/
#define GOPT_NOARG 0
#define GOPT_ARG 2
#ifndef __GNUG__
struct goptargs { int k; int f; const char *s; const char*const*l; const char *a; const char *h; };
#define gopt_start(...) (const void*)(const struct goptargs[]){ __VA_ARGS__, {0, 0, NULL, NULL, NULL, NULL}}
#else
#define gopt_start(...) (const void*)( const struct { int k; int f; const char *s; const char*const*l; const char *a; const char *h;}[]){ __VA_ARGS__, {0, 0, NULL, NULL, NULL, NULL}}
#endif
struct goptargs { int k; int f; const char *s; const char*const*l; const char *a; const char *h; };
#define gopt_start(...) (const void*)(const struct goptargs[]){ __VA_ARGS__, {0, 0, NULL, NULL, NULL, NULL}}
#define gopt_option(k,f,s,l,a,h) { k, f, s, l, a, h }
#define gopt_shorts( ... ) (const char*)(const char[]){ __VA_ARGS__, 0 }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment