97 Commits

Author SHA1 Message Date
Brent Cook
659e87fe1c move ftruncate to common libcompat for tests 2025-10-07 04:23:58 -05:00
Theo Buehler
4494cd0525 Revert "trim some whitespace for hpux checks"
This reverts commit 48d4157f99.
because it didn't trim whitespace and doesn't look right.

Pointed out by @vszakats in
https://github.com/libressl/portable/pull/1165#pullrequestreview-3148582342
2025-08-25 00:03:51 -06:00
Brent Cook
5d9229b169 adjust incorrect commit years
Co-authored-by: Theo Buehler <botovq@users.noreply.github.com>
2025-06-01 17:24:24 +03:00
Brent Cook
340037f69a add autotools build copyright headers 2025-06-01 08:22:33 +07:00
Brent Cook
48d4157f99 trim some whitespace for hpux checks 2025-05-19 14:25:30 +09:00
Theo Buehler
bf808ea0fc Provide getdelim and getline compat shims
These are portable implementations from NetBSD that are needed on
Windows and perhaps some other platforms with the new versions of
the mlkem tests.
2024-12-20 01:14:04 +01:00
Jonas 'Sortie' Termansen
4db5917a6d Warn on unsupported operating systems 2024-11-02 14:13:17 +01:00
Jonas 'Sortie' Termansen
2f680db530 Assume unknown operating systems use ELF.
There's a lot of new Unix-like operating systems out that that might
port LibreSSL (my Sortix is among them) and they all use ELF. If the
operating system doesn't use ELF or isn't an Unix, it doesn't have a
chance at working out of this box anyway, and this change makes
LibreSSL work on a generic and sufficiently featured POSIX system.
2024-11-02 13:45:50 +01:00
Brent Cook
d9c3a5000c Land #1048, clarify that Windows builds are easy 2024-05-28 08:25:41 -05:00
Brent Cook
1e0d453f05 Remove dead bitrig support, error on unsupported platforms 2024-05-28 07:00:04 -05:00
Theo Buehler
f9874d49f6 Remove timegm() compat
Now that all uses of gmtime_r() and timegm() have been converted to
OPENSSL_gmtime() and OPENSSL_timegm(), this is no longer needed.
2024-05-25 13:49:18 +02:00
Christian Andersen
ad6e77ca9f Rename README.windows to README.mingw.md
Since it is mingw specific and does not really
involve other compilers.
2024-05-25 12:43:00 +02:00
Brent Cook
31bb2f25f9 check for control flow integrity support in compiler 2024-02-12 03:14:54 -06:00
Theo Buehler
4ba6cdc48c Land #962 2023-12-12 08:24:59 +01:00
Theo Buehler
9e7eb88ac8 Add configure check for strcasecmp 2023-12-11 18:00:22 +01:00
Viktor Szakats
2d6d9fcc8f upgrade links in comments to HTTPS 2023-12-11 16:21:00 +00:00
Brent Cook
124e0192c8 enable system arc4random on FreeBSD 12+ 2023-11-01 06:43:41 -05:00
Brent Cook
7463f87cf1 add compat getopt implementation, remove patches
This adds a getopt implementation for compatibility where it is not
available, removing a couple of regress patches.

Note, this is a slightly modified copy from OpenBSD libc that doesn't
expose getopt_long, which has dependency conflicts with Windows system
headers and isn't needed anyway.
2023-07-07 12:11:20 +03:00
Jiajie Chen
ef2d6c70da Detect machine/endian.h for macOS 2022-07-12 22:29:39 +08:00
Brent Cook
56bf8d4f41 update autotool macro deprecations
fix latest round of autotool complaints
2022-02-27 06:05:41 -06:00
kinichiro
9a18f4247e Add libmd as platform specific libraries for Solaris 2022-01-17 19:04:23 +09:00
kinichiro
2f3066df94 Set IA-64 compiler flag only if it is HP-UX with IA-64
Compiler switch -mlp64 (GCC) or +DD64(HP CC) gives build failure with
platform HP-UX other than IA-64.
This avoids build break on HP-UX with PA-RISC platform.

Suggested from Larkin Nickle (me <at> larbob org) by libressl ML.
2021-11-23 13:27:17 +09:00
Brent Cook
f690667262 Autoconf updates
Move machine/endian.h to endian.h, use AC_HEADER_RESOLV over individual
header checks, and include prerequisites for netinet/ip.h check.
2021-11-09 22:43:53 -06:00
Jonas 'Sortie' Termansen
fcf6c87788 Support operating systems without some non-POSIX headers
The arpa/nameser.h, netinet/ip.h, and resolv.h headers are not crucial
to building LibreSSL. The netinet/ip.h header is used in nc(1) for
optional IPTOS_ features that can be ifdef'd on systems without support.

The endian.h header is the upcoming standard header and should be used
whenever available and correct. The machine/endian.h header is
non-standard and doesn't have to exist on POSIX systems.

Fix the check for getpagesize(3) not forward declaring the function,
such that CFLAGS with -Werror=implicit-function-declaration doesn't
cause the check to fail.
2021-10-03 13:33:16 +02:00
kinichiro
e07b5feba5 Remove -D_FORTIFY_SOURCE=2 and -lssp with mingw build 2021-05-30 05:12:30 +00:00
kinichiro
420723ee18 Fix mingw build on ubuntu 20.04
- Link libssp to resolve undefined reference __memcpy_chk
- Disable dtlstest since mingw does not have poll
2021-05-30 01:11:45 +00:00
Brent Cook
921c0675a2 Add '--enable-libtls-only' build option 2021-04-07 07:51:45 -05:00
Brent Cook
df3d4bb57a Add -lbcrypt to Windows builds for CNG in getentropy 2020-11-11 05:39:56 -06:00
Brent Cook
2c49c28d47 need ax_check_compile_flag too for older autotools 2020-08-22 18:42:26 -05:00
Brent Cook
56202472bf Add a compile-time check for FORTIFY_SOURCE support
This is broken on some platforms, so pull in the conditional macro from
the latest version of autoconf-archive to test for working support.
2020-08-22 18:42:26 -05:00
Ørjan Malde
b80c4bf262 initial support for midipix 2019-10-20 20:22:22 +02:00
kinichiro
30e91bc6d2 Enable speed on win32
- Use thread and sleep instead of signal and alarm, on win32
- Disable -multi option on win32 since fork is hard to implement
2019-07-14 19:45:34 +09:00
Brent Cook
38c884f205 include -ldl for SHA512 operations 2019-04-23 01:54:33 -05:00
Brent Cook
535246269d add __dead__ annotation support 2019-02-09 09:09:36 -06:00
Brent Cook
a6d7ea9562 update autoconf for latest compat functions 2019-01-31 13:56:56 -06:00
Brent Cook
8730803401 enable asm for mingw64 2019-01-20 20:03:37 -06:00
Brent Cook
91d26602c9 check for more pthread functions that might not be in libc 2019-01-18 18:04:31 -06:00
Brent Cook
3f189a24f2 check if we need to link pthread dynamically
On Linux, bionic and musl for instance do not need libpthread. With
bionic, there is not even a stub library for compatibility.
2019-01-07 06:46:03 -06:00
Brent Cook
c1a44d2220 we don't need to pass this to automake 2019-01-06 15:49:28 -06:00
Brent Cook
7af3ba340d add configure-time check for timespecsub 2019-01-06 15:47:55 -06:00
Brent Cook
158281bdfe AC_CHECK_FUNC does not set the define, prefer AC_CHECK_FUNCS 2018-03-22 21:32:25 -05:00
Brent Cook
987aa6a084 add clock_gettime for macos 10.11 and earlier 2018-03-22 21:04:43 -05:00
Brent Cook
3fb9e63b90 bump base requirement to Windows Vista, use builtin inet_ntop/pton 2018-03-14 07:29:04 -05:00
kinichiro
0ed618095d Add libpthread for libtls build 2018-03-13 23:16:10 +09:00
kinichiro
9e06be3fcd Remove 64bit build designation on Solaris
- Revert commit c18852f650
- Remove -m64 from CMakeLists.txt by commit 08089a1b20
- Suggested by @andy-js in conversation https://github.com/libressl-portable/portable/pull/327
2018-01-11 23:46:22 +09:00
Evgen Bodunov
aff3a43fa0 Fixed getpagesize detection on Android 2017-11-23 15:28:25 +03:00
kinichiro
5afc4e3cd8 add prototype definitions of asprintf and vasprintf for CYGWIN build
- define _GNU_SOURCE in case of cygwin

As compilation warning report by @Dravion
2017-07-16 23:59:55 +09:00
Brent Cook
70ee57c6ad Land #328, generate the crypto export symbol list at build time 2017-07-09 05:12:21 -05:00
Brent Cook
9b88fa46bb generate the crypto export symbol list at build time
we currently do it at configure time, which makes this a generated
source, but generated sources should be cleaned up, which breaks
'make clean; make'
2017-07-08 17:46:16 -05:00
kinichiro
c18852f650 Set Solaris build default to 64 bit 2017-07-08 01:43:07 +09:00