Commit Graph

680 Commits

Author SHA1 Message Date
Guillem Jover
f71d8e0501 Remove bogus deprecation warning from <getopt.h> 2012-05-29 04:51:04 +02:00
Guillem Jover
0b96e1a218 Remove deprecated compatibility includes in headers 2012-05-29 04:51:04 +02:00
Guillem Jover
109cafb393 Remove deprecated headers 2012-05-29 04:51:04 +02:00
Robert Millan
6434858314 Add new expand_number() function
Taken from FreeBSD.

[guillem@hadrons.org:
 - Include <stdint.h> in <bsd/libutil.h>. ]

Signed-off-by: Guillem Jover <guillem@hadrons.org>
2012-05-29 04:50:55 +02:00
Guillem Jover
943939d0e5 Add new closefrom() function
Code taken from sudo, man page from FreeBSD.
2012-05-29 04:36:23 +02:00
Guillem Jover
3d614131b5 Base errc() and warnc() on vwarnc() and verrc() respectively 2012-05-29 04:36:23 +02:00
Guillem Jover
8723226040 Use system __progname variable in progname module if available 2012-05-29 04:36:23 +02:00
Guillem Jover
b5cc17d664 Use getexecname() if available for getprogname()
This function is present on Solaris.
2012-05-29 04:36:23 +02:00
Guillem Jover
abf14c3940 test: Add new headers unit test 2012-05-29 04:36:23 +02:00
Guillem Jover
23973e2221 build: Add a test suite infrastructure 2012-05-29 04:36:23 +02:00
Guillem Jover
980f04f77b build: Do not define already defined _GNU_SOURCE
The macro is defined by configure on config.h which is now implicitly
included by all source files.
2012-05-29 04:36:22 +02:00
Guillem Jover
8d2f12d7f0 build: Include <config.h> through -include for all source files 2012-05-29 04:36:22 +02:00
Guillem Jover
88004b30ff build: Set -Wno-unused-parameter to default CFLAGS 2012-05-29 04:36:22 +02:00
Guillem Jover
dcaa93d984 build: Switch to autotools 2012-05-29 04:35:55 +02:00
Guillem Jover
0aa777f47e Move .pc and .map files to src/ 2012-01-03 07:02:37 +01:00
Guillem Jover
540ab03b18 Move man pages to man/ 2012-01-03 07:02:34 +01:00
Guillem Jover
93321224f6 Rename version script from Versions to libbsd.map 2011-12-11 07:57:05 +01:00
Guillem Jover
2fb7200d45 Fix typos in source comments
Found by codespell.
2011-10-23 19:28:14 +02:00
Guillem Jover
0acd86f6eb build: Use -isystem instead of -I 2011-07-09 22:28:10 +02:00
Guillem Jover
901ed630fc build: Do not add -Iinclude/ to MK_CPPFLAGS
The source code should not be using any of the headers there.
2011-07-09 22:28:10 +02:00
Guillem Jover
059f89ca95 Add missing semicolon to bsd_getopt() declaration
Accidentally lost in commit 4a6303ba3b.
2011-07-09 22:28:00 +02:00
Guillem Jover
4a6303ba3b Constify bsd_getopt(3) arguments
This matches the standard declaration for getopt(3).
2011-06-08 02:10:38 +02:00
Guillem Jover
7446f029b5 Release libbsd 0.3.0 2011-06-02 19:20:55 +02:00
Guillem Jover
e80d338b18 Add a COPYING file to ease the distributors work
This file includes all the copyright and license notices from the source
code in a single place.
2011-06-02 19:20:55 +02:00
Guillem Jover
b891772ad6 Remove blank lines at EOF 2011-05-29 02:49:37 +02:00
Guillem Jover
b0eb19970a Move bsd_getopt() from <bsd/getopt.h> to <bsd/unistd.h>
Deprecate <bsd/getopt.h>.
2011-05-29 02:41:16 +02:00
Guillem Jover
0bf3d3913f Include the correct deprecated headeres when using the overlay 2011-05-29 02:41:15 +02:00
Guillem Jover
913cdd91b1 Do not use the same header inclusion protector for <nlist.h> and <bsd/nlist.h>
Regression introduced in commit f7caf2b30d.
2011-05-29 02:39:44 +02:00
Guillem Jover
200eeb1265 Add LIBBSD_DISABLE_DEPRECATED to deprecated headers
When enabled this will make the inclusion of deprecated headers a
fatal error so that it's easier to spot.
2011-05-29 02:39:29 +02:00
Guillem Jover
fbd622971d Condense and clarify header deprecation warnings
Mention the possibility of using libbsd-overlay.pc.
2011-05-28 10:58:26 +02:00
Guillem Jover
755d86be01 Rename LIBBSD_CLEAN_INCLUDES to LIBBSD_DISABLE_DEPRECATED 2011-05-28 10:58:26 +02:00
Guillem Jover
cd4996cebe Namespace header protector in <bsd/sys/cdefs.h> with LIBBSD_SYS_ 2011-05-28 10:58:26 +02:00
Guillem Jover
a7dd4457f5 Add new <bsd/sys/poll.h> header 2011-05-28 10:58:26 +02:00
Guillem Jover
8be40010ce Add new <bsd/sys/endian.h> header 2011-05-28 10:58:26 +02:00
Guillem Jover
e1f2a6f869 Add new __packed, __aligned and __nonnull attributes 2011-05-28 10:56:03 +02:00
Guillem Jover
87dd203c26 Define __dead2 and __pure2 to actual gcc attributes if possible 2011-05-28 10:31:07 +02:00
Guillem Jover
de2062873f Define <sys/cdefs.h> attributes conditional to the supported gcc version 2011-05-28 10:31:06 +02:00
Guillem Jover
71e5db4cde Define _SYS_CDEFS_H and _SYS_CDEFS_H after including <sys/cdefs.h>
This makes sure the “standard” inclusion protectors are in place, as at
least some FreeBSD kernel headers expect these to be defined to do some
sanity checks.
2011-05-28 10:31:06 +02:00
Guillem Jover
9d04217174 Map getopt to bsd_getopt if we are using the overlay
This will ensure the code can safely and correctly use optreset
transparently.
2011-05-28 10:31:06 +02:00
Guillem Jover
17a9a8472e Rename transparent support to overlay
This affects the pkg-config file now named libbsd-overlay.pc, and the
macro to use the overlay LIBBSD_OVERLAY.
2011-05-27 22:45:26 +02:00
Guillem Jover
94fe901eda Abort compilation if fgetln cannot be wrapped 2011-05-16 13:23:18 +02:00
Guillem Jover
28585a58bd Add fpurge function 2011-05-16 13:23:17 +02:00
Guillem Jover
b36c59c0ed Conditionalize <time.h> inclusion from <bsd/bsd.h>
This was added long time ago to fix some software which was implicitly
depending on the header through some other header, and to avoid having
to modify such software. Conditionalize it on LIBBSD_CLEAN_INCLUDES,
so that buildability can be tested for its future removal.
2011-05-14 14:18:22 +02:00
Guillem Jover
8b6a74775b Conditionalize temporary compatibility inclusions
These inclusions were in place for backward compatibility purposes,
when the headers were split so that code using them would not break.
Make it possible for applications to disable them by defining
LIBBSD_CLEAN_INCLUDES so that buildability can be tested and fixed
before they get removed in a subsequent release.
2011-05-14 14:18:22 +02:00
Guillem Jover
c594192bac Correct library name in man pages 2011-05-14 14:18:06 +02:00
Guillem Jover
8478e57463 Update libbsd header references in man pages
Point to the namespaced path for libbsd specific headers.
2011-05-14 14:16:29 +02:00
Guillem Jover
f7caf2b30d Move all header files to /usr/include/bsd/ and deprecate /usr/include/
First stage of the transition to avoid possible clashes with other
software by moving out of the way the remaining headers from
/usr/include/.

At least nlist.h is known to cause file conflicts with some libelf
implementations. libutil.h is not really complete and might cause
confusion if software detects its availability w/o someone actually
checking. And lastly vis.h is not known to cause any problem and it's
complete, but better be safe than sorry.

The compatibility headers will be removed in a later release.
2011-05-14 13:52:52 +02:00
Guillem Jover
520682e596 Add support for transparent compilation
This means that software being ported should not need to be modified in
the usual case, as the libbsd headers will take over the standard
namespace and fill the missing gaps, and include the system headers.

To use this the new libbsd-transparent.pc file can be used through
pkg-config, which should end up doing the right thing.
2011-05-14 13:43:49 +02:00
Guillem Jover
4c01261f39 Move each version symbol declaration into its own line 2011-05-14 13:43:49 +02:00
Guillem Jover
8a99226f16 Generalize pkg-config file handling
Use a make pattern for the .pc rule to allow using more than one .pc
file. And generalize the .gitignore entry.
2011-05-14 13:43:49 +02:00