Nathan Scott 2c0c5a809c Annotate module API functions in redismodule.h for use with -fno-common (#6900)
In order to keep the redismodule.h self-contained but still usable with
gcc v10 and later, annotate each API function tentative definition with
the __common__ attribute.  This avoids the 'multiple definition' errors
modules will otherwise see for all API functions at link time.

Further details at gcc.gnu.org/gcc-10/porting_to.html

Turn the existing __attribute__ ((unused)), ((__common__)) and ((print))
annotations into conditional macros for any compilers not accepting this
syntax.  These macros only expand to API annotations under gcc.

Provide a pre- and post- macro for every API function, so that they can
be defined differently by the file that includes redismodule.h.

Removing REDISMODULE_API_FUNC in the interest of keeping the function
declarations readable.

Co-authored-by: Yossi Gottlieb <yossigo@gmail.com>
Co-authored-by: Oran Agra <oran@redislabs.com>
(cherry picked from commit 11cd983d58199b6ac7fa54049734457bd767a0b5)
2020-09-01 09:27:58 +03:00
..
2020-09-01 09:27:58 +03:00
2020-09-01 09:27:58 +03:00
2020-05-08 10:37:35 +02:00
2019-11-20 20:39:04 -05:00
2019-07-17 16:40:24 +03:00
2020-05-08 10:37:35 +02:00
2020-04-28 11:20:15 +02:00
2020-04-28 11:20:15 +02:00
2020-04-28 11:20:15 +02:00
2020-07-20 21:08:26 +03:00
2020-09-01 09:27:58 +03:00
2019-02-24 21:38:15 +01:00
2020-07-20 21:08:26 +03:00
2019-10-24 14:24:55 +03:00
2020-07-20 21:08:26 +03:00
2020-05-08 10:37:36 +02:00
2019-11-19 17:23:47 +08:00
2020-04-07 16:52:04 +02:00
2020-04-15 16:03:16 +02:00
2019-10-02 11:30:20 +02:00
2020-04-07 16:53:13 +02:00
2020-04-16 16:09:06 +02:00
2020-03-05 12:51:15 +01:00
2020-05-15 22:23:24 +02:00
2018-11-11 18:49:55 +00:00
2020-09-01 09:27:58 +03:00
2020-07-20 21:08:26 +03:00