Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
8350ea05
Commit
8350ea05
authored
May 07, 2015
by
Jan Lindström
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compiler error if compiler does not support c99 style
initializers.
parent
f704b333
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
3 deletions
+14
-3
storage/innobase/CMakeLists.txt
storage/innobase/CMakeLists.txt
+2
-0
storage/innobase/handler/i_s.cc
storage/innobase/handler/i_s.cc
+5
-1
storage/xtradb/CMakeLists.txt
storage/xtradb/CMakeLists.txt
+2
-0
storage/xtradb/handler/i_s.cc
storage/xtradb/handler/i_s.cc
+5
-2
No files found.
storage/innobase/CMakeLists.txt
View file @
8350ea05
...
...
@@ -144,6 +144,8 @@ IF(HAVE_IB_ATOMIC_PTHREAD_T_GCC)
ADD_DEFINITIONS
(
-DHAVE_IB_ATOMIC_PTHREAD_T_GCC=1
)
ENDIF
()
CHECK_C_SOURCE_COMPILES
(
"struct t1{ int a; char *b; }; struct t1 c= { .a=1, .b=0 }; main() { }"
HAVE_C99_INITIALIZERS
)
ENDIF
(
NOT MSVC
)
# Solaris atomics
...
...
storage/innobase/handler/i_s.cc
View file @
8350ea05
...
...
@@ -157,9 +157,13 @@ do { \
} \
} while (0)
#if !defined __STRICT_ANSI__ && defined __GNUC__ && (__GNUC__) > 2 && !defined __INTEL_COMPILER
#if !defined __STRICT_ANSI__ && defined __GNUC__ && (__GNUC__) > 2 && !defined __INTEL_COMPILER && !defined __clang__
#ifdef HAVE_C99_INITIALIZERS
#define STRUCT_FLD(name, value) .name = value
#else
#define STRUCT_FLD(name, value) name: value
#endif
/* HAVE_C99_INITIALIZERS */
#else
#define STRUCT_FLD(name, value) value
#endif
...
...
storage/xtradb/CMakeLists.txt
View file @
8350ea05
...
...
@@ -180,6 +180,8 @@ IF(HAVE_IB_ATOMIC_PTHREAD_T_GCC)
ADD_DEFINITIONS
(
-DHAVE_IB_ATOMIC_PTHREAD_T_GCC=1
)
ENDIF
()
CHECK_C_SOURCE_COMPILES
(
"struct t1{ int a; char *b; }; struct t1 c= { .a=1, .b=0 }; main() { }"
HAVE_C99_INITIALIZERS
)
ENDIF
(
NOT MSVC
)
# Solaris atomics
...
...
storage/xtradb/handler/i_s.cc
View file @
8350ea05
...
...
@@ -178,10 +178,13 @@ do { \
} \
} while (0)
#if !defined __STRICT_ANSI__ && defined __GNUC__ && (__GNUC__) > 2 &&
\
!defined __INTEL_COMPILER && !defined __clang__
#if !defined __STRICT_ANSI__ && defined __GNUC__ && (__GNUC__) > 2 &&
!defined __INTEL_COMPILER && !defined __clang__
#ifdef HAVE_C99_INITIALIZERS
#define STRUCT_FLD(name, value) .name = value
#else
#define STRUCT_FLD(name, value) name: value
#endif
/* HAVE_C99_INITIALIZERS */
#else
#define STRUCT_FLD(name, value) value
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment