libbsd: Branch 'master' - 4 commits

Guillem Jover guillem at kemper.freedesktop.org
Mon May 25 00:40:06 PDT 2009


 Makefile             |    2 +-
 include/bsd/cdefs.h  |    6 +++++-
 include/bsd/err.h    |    5 +++++
 include/bsd/getopt.h |    4 ++++
 include/bsd/inet.h   |    5 ++++-
 include/bsd/random.h |    5 ++++-
 include/bsd/stdlib.h |    5 ++++-
 include/bsd/string.h |    3 +++
 8 files changed, 30 insertions(+), 5 deletions(-)

New commits:
commit d03b2b07fc7f8084e8f56b69dc65a11c74caf5b7
Author: Guillem Jover <guillem at hadrons.org>
Date:   Mon May 25 09:37:39 2009 +0200

    Release libbsd 0.1.3

diff --git a/Makefile b/Makefile
index 42401b2..6ba703b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 LIB_NAME := libbsd
 LIB_VERSION_MAJOR := 0
 LIB_VERSION_MINOR := 1
-LIB_VERSION_MICRO := 2
+LIB_VERSION_MICRO := 3
 LIB_VERSION := $(LIB_VERSION_MAJOR).$(LIB_VERSION_MINOR).$(LIB_VERSION_MICRO)
 
 LIB_PKGCONFIG := $(LIB_NAME).pc
commit cb1346e5b3bdeb98e4118053e2520ae68d2111b1
Author: Guillem Jover <guillem at hadrons.org>
Date:   Mon May 25 09:25:13 2009 +0200

    Export public functions as extern C

diff --git a/include/bsd/err.h b/include/bsd/err.h
index d60158e..489138b 100644
--- a/include/bsd/err.h
+++ b/include/bsd/err.h
@@ -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
@@ -27,12 +28,15 @@
 #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
diff --git a/include/bsd/getopt.h b/include/bsd/getopt.h
index 4d68b55..699a00e 100644
--- a/include/bsd/getopt.h
+++ b/include/bsd/getopt.h
@@ -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
@@ -27,10 +28,13 @@
 #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
diff --git a/include/bsd/inet.h b/include/bsd/inet.h
index 14ea256..1f6e597 100644
--- a/include/bsd/inet.h
+++ b/include/bsd/inet.h
@@ -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
@@ -27,9 +27,12 @@
 #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
 
diff --git a/include/bsd/random.h b/include/bsd/random.h
index 578c9be..f76adea 100644
--- a/include/bsd/random.h
+++ b/include/bsd/random.h
@@ -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
@@ -27,11 +27,14 @@
 #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
 
diff --git a/include/bsd/stdlib.h b/include/bsd/stdlib.h
index b01d970..75f994a 100644
--- a/include/bsd/stdlib.h
+++ b/include/bsd/stdlib.h
@@ -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
@@ -29,9 +29,11 @@
 #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
diff --git a/include/bsd/string.h b/include/bsd/string.h
index e660369..cf6368b 100644
--- a/include/bsd/string.h
+++ b/include/bsd/string.h
@@ -27,15 +27,18 @@
 #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
commit 61fa98ea9e288abb4aa5b12be8fed9f73e2a1a9c
Author: Guillem Jover <guillem at hadrons.org>
Date:   Mon May 25 09:12:45 2009 +0200

    Add missing <stdarg.h> include in <bsd/err.h>

diff --git a/include/bsd/err.h b/include/bsd/err.h
index b8f9c82..d60158e 100644
--- a/include/bsd/err.h
+++ b/include/bsd/err.h
@@ -28,6 +28,7 @@
 #define LIBBSD_ERR_H
 
 #include <err.h>
+#include <stdarg.h>
 
 extern void warnc (int code, const char *format, ...);
 extern void vwarnc (int code, const char *format, va_list ap);
commit 931e04343038cfc543f6d931488e597c9bee2d7e
Author: Guillem Jover <guillem at hadrons.org>
Date:   Mon May 25 08:56:34 2009 +0200

    Add new __RCSID macro
    
    Define it to nothing, so that source imported from BSDs can be easily
    compiled w/o needing to modify them.

diff --git a/include/bsd/cdefs.h b/include/bsd/cdefs.h
index 9d5920c..0ed7be9 100644
--- a/include/bsd/cdefs.h
+++ b/include/bsd/cdefs.h
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2004, 2005, 2006 Guillem Jover
+ * Copyright © 2004, 2005, 2006, 2009 Guillem Jover
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -61,6 +61,10 @@
 # define __bounded__(x, y, z)
 #endif
 
+#ifndef __RCSID
+# define __RCSID(x)
+#endif
+
 #ifndef __FBSDID
 # define __FBSDID(x)
 #endif


More information about the libbsd mailing list