File: config.h

package info (click to toggle)
pdp 1%3A0.14.1-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,904 kB
  • ctags: 4,405
  • sloc: ansic: 22,321; asm: 2,088; makefile: 551; perl: 145; sh: 93; cpp: 4
file content (32 lines) | stat: -rw-r--r-- 602 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
#ifndef _ZL_CONFIG_H_
#define _ZL_CONFIG_H_

#ifdef PD

/* Tie ZL into mothership. */
void post(const char *msg, ...);
void startpost(const char *fmt, ...);
#define ZL_LOG(...)    startpost("pdp: " __VA_ARGS__)
#define ZL_PERROR(...) perror("pdp: " __VA_ARGS__)

#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