Project

General

Profile

Bug #4555 » foo.c

test program demonstrating the problem... - Richard PALO, 2014-02-01 03:18 PM

 
1
#include <stdarg.h>
2
#include <stdio.h>
3
#include <locale.h>
4
#include <libintl.h>
5
#define PACKAGE "rpm"
6
#define _(Text) dgettext (PACKAGE, Text)
7

    
8

    
9
#//pragma push_macro("_")
10
#include <gelf.h>
11
#//pragma pop_macro("_")
12

    
13
#define RPM_GNUC_PRINTF(format_idx,arg_idx) __attribute__((__format__ (__printf__, format_idx, arg_idx)))
14
void rpmlog (int code, const char *fmt, ...) RPM_GNUC_PRINTF(2, 3);
15

    
16
void foo(void);
17

    
18
void foo(void) {
19
	char *tempfn = "foo";
20
	int RPMLOG_ERR = 3;
21
	rpmlog(RPMLOG_ERR, _("error creating temporary file %s: %m\n"), tempfn);
22
}
(1-1/4)