diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2017-04-05 14:18:58 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2017-04-05 14:18:58 +0300 |
commit | 3ed130516767b3543d07b7c704c40783ebbc36b7 (patch) | |
tree | c0311f24bddb5faae7669ea7fe89a68a8cbae073 | |
parent | 0f30ecc8190bc14b85c06beb86d1f1597a275d61 (diff) | |
download | libmicrohttpd-3ed130516767b3543d07b7c704c40783ebbc36b7.tar.gz libmicrohttpd-3ed130516767b3543d07b7c704c40783ebbc36b7.zip |
Updated autoinit_funcs.h to latest upstream version with proper support of Oracle/Sun compiler.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/include/autoinit_funcs.h | 23 |
2 files changed, 18 insertions, 9 deletions
@@ -1,3 +1,7 @@ | |||
1 | Wed Apr 05 14:14:22 MSK 2017 | ||
2 | Updated autoinit_funcs.h to latest upstream version with proper support of | ||
3 | Oracle/Sun compiler. -EG | ||
4 | |||
1 | Wed Apr 05 12:53:26 MSK 2017 | 5 | Wed Apr 05 12:53:26 MSK 2017 |
2 | Fixed some compiler warnings. | 6 | Fixed some compiler warnings. |
3 | Fixed error snprintf() errors detection in digestauth.c. | 7 | Fixed error snprintf() errors detection in digestauth.c. |
diff --git a/src/include/autoinit_funcs.h b/src/include/autoinit_funcs.h index 6d5117e1..d925c7be 100644 --- a/src/include/autoinit_funcs.h +++ b/src/include/autoinit_funcs.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * AutoinitFuncs: Automatic Initialization and Deinitialization Functions | 2 | * AutoinitFuncs: Automatic Initialization and Deinitialization Functions |
3 | * CopyrightCopyright (C) 2014 Karlson2k (Evgeny Grin) | 3 | * Copyright(C) 2014-2017 Karlson2k (Evgeny Grin) |
4 | * | 4 | * |
5 | * This header is free software; you can redistribute it and / or | 5 | * This header is free software; you can redistribute it and / or |
6 | * modify it under the terms of the GNU Lesser General Public | 6 | * modify it under the terms of the GNU Lesser General Public |
@@ -47,11 +47,13 @@ | |||
47 | 47 | ||
48 | _SET_INIT_AND_DEINIT_FUNCS(libInit,libDeinit); | 48 | _SET_INIT_AND_DEINIT_FUNCS(libInit,libDeinit); |
49 | ------------------------------------------------- | 49 | ------------------------------------------------- |
50 | 50 | ||
51 | If initializer or deinitializer functions is not needed, just define | 51 | If initializer or deinitializer function is not needed, just define |
52 | it as empty function. | 52 | it as empty function. |
53 | 53 | ||
54 | This header should work with GCC, clang, MSVC (2010 or later). | 54 | This header should work with GCC, clang, MSVC (2010 or later) and |
55 | SunPro / Sun Studio / Oracle Solaris Studio / Oracle Developer Studio | ||
56 | compiler. | ||
55 | Supported C and C++ languages; application, static and dynamic (DLL) | 57 | Supported C and C++ languages; application, static and dynamic (DLL) |
56 | libraries; non-optimized (Debug) and optimized (Release) compilation | 58 | libraries; non-optimized (Debug) and optimized (Release) compilation |
57 | and linking. | 59 | and linking. |
@@ -65,10 +67,10 @@ | |||
65 | * Current version of the header. | 67 | * Current version of the header. |
66 | * 0x01093001 = 1.9.30-1. | 68 | * 0x01093001 = 1.9.30-1. |
67 | */ | 69 | */ |
68 | #define AUTOINIT_FUNCS_VERSION 0x01000001 | 70 | #define AUTOINIT_FUNCS_VERSION 0x01000100 |
69 | 71 | ||
70 | #if defined(__GNUC__) || defined(__SUNPRO_C) | 72 | #if defined(__GNUC__) |
71 | #/* if possible - check for supported attribute */ | 73 | /* if possible - check for supported attribute */ |
72 | #ifdef __has_attribute | 74 | #ifdef __has_attribute |
73 | #if !__has_attribute(constructor) || !__has_attribute(destructor) | 75 | #if !__has_attribute(constructor) || !__has_attribute(destructor) |
74 | #define _GNUC_ATTR_CONSTR_NOT_SUPPORTED 1 | 76 | #define _GNUC_ATTR_CONSTR_NOT_SUPPORTED 1 |
@@ -76,7 +78,10 @@ | |||
76 | #endif /* __has_attribute */ | 78 | #endif /* __has_attribute */ |
77 | #endif /* __GNUC__ */ | 79 | #endif /* __GNUC__ */ |
78 | 80 | ||
79 | #if (defined(__GNUC__) || defined(__SUNPRO_C)) && !defined(_GNUC_ATTR_CONSTR_NOT_SUPPORTED) | 81 | /* "_attribute__ ((constructor))" is supported by GCC, clang and |
82 | Sun/Oracle compiler starting from version 12.1. */ | ||
83 | #if (defined(__GNUC__) && !defined(_GNUC_ATTR_CONSTR_NOT_SUPPORTED)) || \ | ||
84 | (defined(__SUNPRO_C) && __SUNPRO_C+0 >= 0x5100) | ||
80 | 85 | ||
81 | #define GNUC_SET_INIT_AND_DEINIT(FI,FD) \ | 86 | #define GNUC_SET_INIT_AND_DEINIT(FI,FD) \ |
82 | void __attribute__ ((constructor)) _GNUC_init_helper_##FI(void) \ | 87 | void __attribute__ ((constructor)) _GNUC_init_helper_##FI(void) \ |