1
0
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:
Tim Potter 2004-09-08 02:48:27 +00:00 committed by Gerald (Jerry) Carter
parent fc84e916f6
commit 17f2560ce6
2 changed files with 11 additions and 2 deletions

View File

@ -45,10 +45,11 @@
#undef HAVE_TERMIOS_H
#endif
#ifdef __GNUC__
#if (__GNUC__ >= 3)
/** 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. **/
* argument. Note that some gcc 2.x versions don't handle this
* properly **/
#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2)))
#else
#define PRINTF_ATTRIBUTE(a1, a2)

View File

@ -32,7 +32,15 @@ extern "C" {
#endif
#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)))
#else
#define PRINTF_ATTRIBUTE(a1, a2)
#endif
#endif
/* flags to tdb_store() */