Changeset View
Changeset View
Standalone View
Standalone View
libexec/rtld-elf/rtld_printf.h
Show All 25 Lines | |||||
* | * | ||||
* $FreeBSD$ | * $FreeBSD$ | ||||
*/ | */ | ||||
#ifndef RTLD_PRINTF_H | #ifndef RTLD_PRINTF_H | ||||
#define RTLD_PRINTF_H 1 | #define RTLD_PRINTF_H 1 | ||||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
#include <stdarg.h> | |||||
#include <unistd.h> | #include <unistd.h> | ||||
int rtld_snprintf(char *buf, size_t bufsize, const char *fmt, ...) | int rtld_snprintf(char *buf, size_t bufsize, const char *fmt, ...) | ||||
__printflike(3, 4); | __printflike(3, 4); | ||||
int rtld_vsnprintf(char *buf, size_t bufsize, const char *fmt, va_list ap); | int rtld_vsnprintf(char *buf, size_t bufsize, const char *fmt, va_list ap); | ||||
int rtld_vfdprintf(int fd, const char *fmt, va_list ap); | int rtld_vfdprintf(int fd, const char *fmt, va_list ap); | ||||
int rtld_fdprintf(int fd, const char *fmt, ...) __printflike(2, 3); | int rtld_fdprintf(int fd, const char *fmt, ...) __printflike(2, 3); | ||||
void rtld_fdputstr(int fd, const char *str); | void rtld_fdputstr(int fd, const char *str); | ||||
void rtld_fdputchar(int fd, int c); | void rtld_fdputchar(int fd, int c); | ||||
#define rtld_printf(...) rtld_fdprintf(STDOUT_FILENO, __VA_ARGS__) | #define rtld_printf(...) rtld_fdprintf(STDOUT_FILENO, __VA_ARGS__) | ||||
#define rtld_putstr(str) rtld_fdputstr(STDOUT_FILENO, (str)) | #define rtld_putstr(str) rtld_fdputstr(STDOUT_FILENO, (str)) | ||||
#define rtld_putchar(c) rtld_fdputchar(STDOUT_FILENO, (c)) | #define rtld_putchar(c) rtld_fdputchar(STDOUT_FILENO, (c)) | ||||
#endif | #endif |