File: config.h

package info (click to toggle)
pdp 1%3A0.14.1%2Bdarcs20180201-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 3,228 kB
  • sloc: ansic: 22,424; asm: 2,088; makefile: 537; perl: 145; sh: 108; cpp: 4
file content (39 lines) | stat: -rw-r--r-- 715 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef _ZL_CONFIG_H_
#define _ZL_CONFIG_H_

#ifdef PD

/* Tie ZL into mothership. */
void post(const char *msg, ...);
void startpost(const char *fmt, ...);

#if 0
#define ZL_LOG(...)    startpost("pdp: " __VA_ARGS__)
#define ZL_PERROR(...) perror("pdp: " __VA_ARGS__)
#else
#include <stdio.h>
#define ZL_LOG(...) fprintf(stderr, __VA_ARGS__)
#define ZL_PERROR ZL_LOG
#endif

#else

// #warning ZL running on plain libc

#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
static inline void ZL_LOG(const char *msg, ...) {
    va_list vl;
    va_start(vl,msg);
    fprintf(stderr, "zl: ");
    vfprintf(stderr, msg, vl);
    fprintf(stderr, "\n");
    va_end(vl);
}
#define ZL_PERROR perror

#endif


#endif