Commit Graph

20 Commits

Author SHA1 Message Date
Brent Cook
00b51d5c25 conditionally build strnlen if needed.
it is only used by strndup

prodded by Sortie@
2014-08-02 21:59:36 -05:00
Brent Cook
b9ff0728e1 harmonize asprintf with OpenSSH
* use the original name for the file from OpenSSH (remove duplicate version)
 * add va_copy/__va_copy checks to configure
 * incorporate proposed fixes to openssh version:
   + include more system headers directly for various definitions
   + limit the scope of va_copy/va_end to their affected vsnprintf calls
   + simplify error handling, removing a dead assignment
2014-07-30 06:53:02 -05:00
Brent Cook
35e2d8d048 add asprintf / vasprintf from OpenSSH portable
ok deraadt@ beck@
2014-07-29 11:17:22 -05:00
Brent Cook
981fc3618a Guard individual compatibility header prototypes.
This is to avoid redefining prototypes from the libc headers. Also,
simplify the autoconf function checks and remove some copy/paste
errors checking for 'write'.

ok wouter@
2014-07-28 13:52:07 -05:00
Brent Cook
f8195c9c22 check link requirements for dl_iterate_phdr
Note that gcc chose to disable this rather than cause link issues with
older copies of Solaris 10:
https://gcc.gnu.org/ml/gcc-patches/2012-01/msg00816.html

If we want to support Solaris <10.10 (I'd rather support up-to-date
versions), getentropy_solaris would need to change.
2014-07-28 07:26:42 -05:00
Brent Cook
0a74a4d464 add strndup/strnlen compat functions from OpenBSD 2014-07-28 07:07:23 -05:00
Brent Cook
a5c82283e0 remove per-OS arc4random_buf overrides
If an OS provides an arc4random_buf implementation in its C library,
prefer it over an in-library version. This allows OS-specific
implementations to become more robust over time. It also prevents
possible link-time confusion as to which arc4random_buf implementation
is in use by an application when linked with LibreSSL.

The built-in unit tests will identify some common issues, such as fork
safety and PID wrap handling. Other elements, such as seeding
mechanisms, should be audited by the vendor or user for correctness.

ok deraadt@ beck@
2014-07-24 21:36:38 -05:00
Brent Cook
f425f564d5 test for and use system explicit_bzero if it exists
ok beck@ guenther@
2014-07-21 19:54:07 -05:00
Brent Cook
0ec7cdcbad include err.h shim
Includes compatible replacements, or uses system err.h if available.

ok beck@ guenther@
2014-07-21 19:53:53 -05:00
Brent Cook
f4d98ff1b2 conditionally disable -Wpointer-sign where supported
ok beck@
2014-07-20 16:30:56 -05:00
Brent Cook
d697fdb4af initial underpinnings for mingw/cross compilation support
Use canonical host rather than target so that this works:
 CC=i686-w64-mingw32-gcc ./configure --host=i686-w64-mingw32

 Conditionally compile Linux issetugid compatibility function

ok beck@
2014-07-18 09:19:17 -05:00
Mark Kettenis
687a2966ba remove stray brackets in --with-enginesdir/openssldir support
ok beck@
2014-07-14 15:43:18 +02:00
Brent Cook
7a9aa4dd7e use generic test for clock_gettime flags
ok beck@
2014-07-12 10:08:39 -05:00
Brent Cook
b12be4016a added configurable ENGINESDIR and OPENSSLDIR
use --with-enginesdir and --with-openssldir

ok beck@
2014-07-12 05:28:21 -05:00
Bob Beck
4b8c359b94 remove problematic DISTCLEANFILES variable
ok bcook@
2014-07-13 03:13:35 -06:00
Brent Cook
5c43a9e5ef cleanup auto-generated .pc files
ok beck@
2014-07-12 03:44:31 -05:00
Brent Cook
65944782c3 add platform libraries to libcompat's LIBADD list
ok beck@
2014-07-12 03:34:08 -05:00
Brent Cook
6017202b77 disable unconditional -Wno-pointer-sign
ok beck@
2014-07-11 21:07:48 -05:00
Brent Cook
058914fea2 add a check to see if <sys/sysctl.h> exists
ok beck@
2014-07-11 18:10:50 -05:00
Brent Cook
596ef45803 source library version from a common place, speed man builds
grab library version from VERSION file
build manpages only on changes

ok beck@
2014-07-12 04:02:35 -06:00