File: stdio.h

package info (click to toggle)
openntpd 1%3A6.2p3-4.2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 2,472 kB
  • sloc: ansic: 9,413; sh: 4,425; yacc: 692; makefile: 310
file content (30 lines) | stat: -rw-r--r-- 514 bytes parent folder | download | duplicates (4)
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
/*
 * Public domain
 * stdio.h compatibility shim
 */

#include_next <stdio.h>

#ifndef LIBCRYPTOCOMPAT_STDIO_H
#define LIBCRYPTOCOMPAT_STDIO_H

#ifndef HAVE_ASPRINTF
#include <stdarg.h>
int vasprintf(char **str, const char *fmt, va_list ap);
int asprintf(char **str, const char *fmt, ...);
#endif

#ifdef _WIN32
#include <errno.h>
#include <string.h>

static inline void
posix_perror(const char *s)
{
	fprintf(stderr, "%s: %s\n", s, strerror(errno));
}

#define perror(errnum) posix_perror(errnum)
#endif

#endif