mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-18 02:55:12 +00:00
ISO C99 forbids named variadic macros
* also at least a single variadic argument must be specified, so this (absolutely perfect) code doesn't work * this should fix it without changing the way the macros are to be called git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@1063 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
parent
cb653c0baa
commit
36a18732ea
12
src/conky.h
12
src/conky.h
@ -96,11 +96,15 @@ extern unsigned int text_buffer_size;
|
|||||||
|
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
|
||||||
#define ERR(s, varargs...) fprintf(stderr, "Conky: " s "\n", ##varargs)
|
#define ERR(...) { \
|
||||||
|
fprintf(stderr, "Conky: "); \
|
||||||
|
fprintf(stderr, __VA_ARGS__); \
|
||||||
|
fprintf(stderr, "\n"); \
|
||||||
|
}
|
||||||
|
|
||||||
/* critical error */
|
/* critical error */
|
||||||
#define CRIT_ERR(s, varargs...) \
|
#define CRIT_ERR(...) \
|
||||||
{ fprintf(stderr, "Conky: " s "\n", ##varargs); exit(EXIT_FAILURE); }
|
{ ERR(__VA_ARGS__); exit(EXIT_FAILURE); }
|
||||||
|
|
||||||
struct i8k_struct {
|
struct i8k_struct {
|
||||||
char *version;
|
char *version;
|
||||||
@ -124,7 +128,7 @@ struct net_stat {
|
|||||||
long long recv, trans;
|
long long recv, trans;
|
||||||
double recv_speed, trans_speed;
|
double recv_speed, trans_speed;
|
||||||
struct sockaddr addr;
|
struct sockaddr addr;
|
||||||
char* addrs;
|
char* addrs;
|
||||||
double net_rec[15], net_trans[15];
|
double net_rec[15], net_trans[15];
|
||||||
// wireless extensions
|
// wireless extensions
|
||||||
char essid[32];
|
char essid[32];
|
||||||
|
Loading…
Reference in New Issue
Block a user