mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
r2248: Merge of tridge's PRINTF_ATTRIBUTE fixes from samba4.
(This used to be commit 53bfb76608
)
This commit is contained in:
parent
fc84e916f6
commit
17f2560ce6
@ -45,10 +45,11 @@
|
|||||||
#undef HAVE_TERMIOS_H
|
#undef HAVE_TERMIOS_H
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#if (__GNUC__ >= 3)
|
||||||
/** Use gcc attribute to check printf fns. a1 is the 1-based index of
|
/** Use gcc attribute to check printf fns. a1 is the 1-based index of
|
||||||
* the parameter containing the format, and a2 the index of the first
|
* the parameter containing the format, and a2 the index of the first
|
||||||
* argument. **/
|
* argument. Note that some gcc 2.x versions don't handle this
|
||||||
|
* properly **/
|
||||||
#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2)))
|
#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2)))
|
||||||
#else
|
#else
|
||||||
#define PRINTF_ATTRIBUTE(a1, a2)
|
#define PRINTF_ATTRIBUTE(a1, a2)
|
||||||
|
@ -32,7 +32,15 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef PRINTF_ATTRIBUTE
|
#ifndef PRINTF_ATTRIBUTE
|
||||||
|
/** Use gcc attribute to check printf fns. a1 is the 1-based index of
|
||||||
|
* the parameter containing the format, and a2 the index of the first
|
||||||
|
* argument. Note that some gcc 2.x versions don't handle this
|
||||||
|
* properly **/
|
||||||
|
#if (__GNUC__ >= 3)
|
||||||
#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2)))
|
#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2)))
|
||||||
|
#else
|
||||||
|
#define PRINTF_ATTRIBUTE(a1, a2)
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* flags to tdb_store() */
|
/* flags to tdb_store() */
|
||||||
|
Loading…
Reference in New Issue
Block a user