/*
* Copyright © 2006 Robert Millan
+ * Copyright © 2009 Guillem Jover
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
#ifndef LIBBSD_ERR_H
#define LIBBSD_ERR_H
+#include <sys/cdefs.h>
#include <err.h>
#include <stdarg.h>
+__BEGIN_DECLS
extern void warnc (int code, const char *format, ...);
extern void vwarnc (int code, const char *format, va_list ap);
extern void errc (int status, int code, const char *format, ...);
extern void verrc (int status, int code, const char *format, va_list ap);
+__END_DECLS
#endif
/*
* Copyright © 2006 Robert Millan
+ * Copyright © 2009 Guillem Jover
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
#ifndef LIBBSD_GETOPT_H
#define LIBBSD_GETOPT_H
+#include <sys/cdefs.h>
#include <getopt.h>
+__BEGIN_DECLS
extern int optreset;
int bsd_getopt (int, char **, char *);
+__END_DECLS
#endif
/*
- * Copyright © 2008 Guillem Jover
+ * Copyright © 2008, 2009 Guillem Jover
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
#ifndef LIBBSD_INET_H
#define LIBBSD_INET_H
+#include <sys/cdefs.h>
#include <stddef.h>
+__BEGIN_DECLS
int inet_net_pton(int af, const char *src, void *dst, siez_t size);
+__END_DECLS
#endif
/*
- * Copyright © 2004, 2005 Guillem Jover
+ * Copyright © 2004, 2005, 2009 Guillem Jover
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
#ifndef LIBBSD_RANDOM_H
#define LIBBSD_RANDOM_H
+#include <sys/cdefs.h>
#include <sys/types.h>
+__BEGIN_DECLS
u_int32_t arc4random();
void arc4random_stir();
void arc4random_addrandom(u_char *dat, int datlen);
+__END_DECLS
#endif
/*
* Copyright © 2005 Aurelien Jarno
* Copyright © 2006 Robert Millan
- * Copyright © 2008 Guillem Jover
+ * Copyright © 2008, 2009 Guillem Jover
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
#ifndef LIBBSD_STDLIB_H
#define LIBBSD_STDLIB_H
+#include <sys/cdefs.h>
#include <sys/stat.h>
#include <stdlib.h>
+__BEGIN_DECLS
const char *fmtcheck (const char *, const char *);
char *getprogname ();
mode_t getmode(const void *set, mode_t mode);
void *setmode(const char *mode_str);
+__END_DECLS
#endif
#ifndef LIBBSD_STRING_H
#define LIBBSD_STRING_H
+#include <sys/cdefs.h>
#include <sys/types.h>
#include <stddef.h>
#include <stdio.h>
+__BEGIN_DECLS
size_t strlcpy(char *dst, const char *src, size_t siz);
size_t strlcat(char *dst, const char *src, size_t siz);
char *fgetln(FILE *fp, size_t *lenp);
wchar_t *fgetwln(FILE * __restrict fp, size_t *lenp);
void strmode(mode_t mode, char *str);
+__END_DECLS
#endif