]> git.ipfire.org Git - thirdparty/libbsd.git/commitdiff
Export public functions as extern C
authorGuillem Jover <guillem@hadrons.org>
Mon, 25 May 2009 07:25:13 +0000 (09:25 +0200)
committerGuillem Jover <guillem@hadrons.org>
Mon, 25 May 2009 07:25:13 +0000 (09:25 +0200)
include/bsd/err.h
include/bsd/getopt.h
include/bsd/inet.h
include/bsd/random.h
include/bsd/stdlib.h
include/bsd/string.h

index d60158e04c7237abb7331b42176e677aea2ce89f..489138bd5f5bf689fc869f1c63b78b7349fbb707 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * 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
index 4d68b55b002d8b38f16ce98f8cafb075ae60c60c..699a00e37a0c8dc5c408f3ce878af7630d16b774 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * 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
index 14ea2568db2cf8cd109983d1edf1b9883f407b5e..1f6e597c6d05db1b51ea39636a7ddeb5a07bf5fa 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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
 
index 578c9be2973c72036489710510ee451ff6ddcfaf..f76adea062f797bb8450f56fe371c957230a259f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * 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
 
index b01d9705d49b8bba1054dafd9ad84547517626fe..75f994ad7700d65879a3c7c2daea5bd829220c38 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * 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 ();
@@ -45,5 +47,6 @@ int heapsort (void *, size_t, size_t, int (*)(const void *, const void *));
 
 mode_t getmode(const void *set, mode_t mode);
 void *setmode(const char *mode_str);
+__END_DECLS
 
 #endif
index e66036961a476316556bcb2e8bd5eeea5b66c24d..cf6368bb03ceaa0bb23b22a40fb57c2202d2cfaf 100644 (file)
 #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