]>
iEval git - authen-passphrase-scrypt.git/blob - scrypt-1.2.1/libcperciva/util/warnp.h
7 /* Avoid namespace collisions with BSD <err.h>. */
8 #define warn libcperciva_warn
9 #define warnx libcperciva_warnx
12 * warnp_setprogname(progname):
13 * Set the program name to be used by warn() and warnx() to ${progname}.
15 void warnp_setprogname(const char *);
16 #define WARNP_INIT do { \
17 if (argv[0] != NULL) \
18 warnp_setprogname(argv[0]); \
21 /* As in BSD <err.h>. */
22 void warn(const char *, ...);
23 void warnx(const char *, ...);
26 * If compiled with DEBUG defined, print __FILE__ and __LINE__.
29 #define warnline do { \
30 warnx("%s, %d", __FILE__, __LINE__); \
37 * Call warn(3) or warnx(3) depending upon whether errno == 0; and clear
38 * errno (so that the standard error message isn't repeated later).
40 #define warnp(...) do { \
50 * Call warnx(3) and set errno == 0. Unlike warnp, this should be used
51 * in cases where we're reporting a problem which we discover ourselves
52 * rather than one which is reported to us from a library or the kernel.
54 #define warn0(...) do { \
60 #endif /* !_WARNP_H_ */
This page took 0.046386 seconds and 4 git commands to generate.