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
97fb5845
Commit
97fb5845
authored
Feb 09, 2011
by
MySQL Build Team
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding macro definition for MY_GNUC_PREREQ
parent
6c348965
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
include/my_compiler.h
include/my_compiler.h
+17
-1
No files found.
include/my_compiler.h
View file @
97fb5845
...
...
@@ -32,8 +32,15 @@
/* GNU C/C++ */
#if defined __GNUC__
/* Convenience macro to test the minimum required GCC version. */
# define MY_GNUC_PREREQ(maj, min) \
((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
/* Any after 2.95... */
# define MY_ALIGN_EXT
/* Comunicate to the compiler the unreachability of the code. */
# if MY_GNUC_PREREQ(4,5)
# define MY_ASSERT_UNREACHABLE() __builtin_unreachable()
# endif
/* Microsoft Visual C++ */
#elif defined _MSC_VER
...
...
@@ -67,8 +74,13 @@
#endif
/**
Generic
compiler-dependent
features.
Generic
(compiler-independent)
features.
*/
#ifndef MY_GNUC_PREREQ
# define MY_GNUC_PREREQ(maj, min) (0)
#endif
#ifndef MY_ALIGNOF
# ifdef __cplusplus
template
<
typename
type
>
struct
my_alignof_helper
{
char
m1
;
type
m2
;
};
...
...
@@ -79,6 +91,10 @@
# endif
#endif
#ifndef MY_ASSERT_UNREACHABLE
# define MY_ASSERT_UNREACHABLE() do { assert(0); } while (0)
#endif
/**
C++ Type Traits
*/
...
...
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