path: root/defines.h
AgeCommit message (Collapse)Author
2021-01-26Disable sntrup761 if compiler doesn't support VLAs.Darren Tucker
The sntrup761 code sourced from supercop uses variable length arrays. Although widely supported, they are not part of the ANSI C89 spec so if the compiler does not support VLAs, disable the KEX method by replacing the kex functions with no-op ones similar to what we do in kexecdh.c. This should allow OpenSSH to build with a plain C89 compiler again. Spotted by tim@, ok djm@.
2020-09-11Remove HAVE_MMAP and BROKEN_MMAPSebastian Andrzej Siewior
BROKEN_MMAP is no longer defined since commit 1cfd5c06efb12 ("Remove portability support for mmap") this commit also removed other HAVE_MMAP user. I didn't find anything that defines HAVE_MMAP. The check does not trigger because compression on server side is by default COMP_DELAYED (2) so it never triggers. Remove remaining HAVE_MMAP and BROKEN_MMAP bits. Signed-off-by: Sebastian Andrzej Siewior <>
2020-05-01Use LONG_LONG_MAX and friends if available.Darren Tucker
If we don't have LLONG_{MIN,MAX} but do have LONG_LONG_{MIN,MAX} then use those instead. We do calculate these values in configure, but it turns out that at least one compiler (old HP ANSI C) can't parse "-9223372036854775808LL" without mangling it. (It can parse "-9223372036854775807LL" which is presumably why its limits.h defines LONG_LONG_MIN as the latter minus 1.) Fixes rekey test when compiled with the aforementioned compiler.
2020-02-09Check if UINT32_MAX is defined before redefining.Darren Tucker
2020-01-28compat for missing IPTOS_DSCP_LE in system headersDamien Miller
2020-01-26Move definition of UINT32_MAX.Darren Tucker
This allows us to always define it if needed not just if we also define the type ourself.
2019-11-15Add SSIZE_MAX when we define ssize_t.Darren Tucker
2019-10-28Define UINT32_MAX if needed.Darren Tucker
2019-10-08Make DEF_WEAK more likely to be correct.Darren Tucker
Completely nop-ing out DEF_WEAK leaves an empty statemment which some compilers don't like. Replace with a no-op function template. ok djm@
2019-09-24Add more ToS bits, currently only used by netcat.Darren Tucker
2019-07-08remove realpath() compat replacementDamien Miller
We shipped a BSD implementation of realpath() because sftp-server depended on its behaviour. OpenBSD is now moving to a more strictly POSIX-compliant realpath(2), so sftp-server now unconditionally requires its own BSD-style realpath implementation. As such, there is no need to carry another independant implementation in openbsd-compat. ok dtucker@
2018-07-31Remove support for S/KeyDamien Miller
Most people will 1) be using modern multi-factor authentication methods like TOTP/OATH etc and 2) be getting support for multi-factor authentication via PAM or BSD Auth.
2018-02-15Remove UNICOS support.Darren Tucker
The code required to support it is quite invasive to the mainline code that is synced with upstream and is an ongoing maintenance burden. Both the hardware and software are literal museum pieces these days and we could not find anyone still running OpenSSH on one.
2017-06-10portability for sftp globbed ls sort by mtimeDamien Miller
Include replacement timespeccmp() for systems that lack it. Support time_t struct stat->st_mtime in addition to timespec stat->st_mtim, as well as unsorted fallback.
2017-05-01Define INT32_MAX and INT64_MAX if needed.Darren Tucker
2016-10-15Move DEF_WEAK into defines.h.Darren Tucker
As well pull in more recent changes from OpenBSD these will start to arrive so put it where the definition is shared.
2016-08-17Remove obsolete CVS $Id from source files.Darren Tucker
Since -portable switched to git the CVS $Id tags are no longer being updated and are becoming increasingly misleading. Remove them.
2016-07-23Move Cygwin IPPORT_RESERVED overrride to defines.hDarren Tucker
Patch from vinschen at
2015-10-29Prevent name collisions with system glob (bz#2463)Darren Tucker
Move glob.h from includes.h to the only caller (sftp) and override the names for the symbols. This prevents name collisions with the system glob in the case where something other than ssh uses it (eg kerberos). With jjelen at, ok djm@
2015-03-04Revert "define __unused to nothing if not already defined"Damien Miller
This reverts commit 1598419e38afbaa8aa5df8dd6b0af98301e2c908. Some system headers have objects named __unused
2015-03-04define __unused to nothing if not already definedDamien Miller
fixes builds on BSD/OS
2015-02-25Move definition of _NSIG.Darren Tucker
_NSIG is only unsed in one file, so move it there prevent redefinition warnings reported by Kevin Brott.
2015-02-24include netdb.h to look for MAXHOSTNAMELEN; ok timDamien Miller
2015-02-23portability fix: if we can't dind a better define for HOST_NAME_MAX, use 255Tim Rice
2015-02-21More correct checking of HAVE_DECL_AI_NUMERICSERV.Darren Tucker
2015-02-21Add null declaration of AI_NUMERICINFO.Darren Tucker
Some platforms (older FreeBSD and DragonFly versions) do have getaddrinfo() but do not have AI_NUMERICINFO. so define it to zero in those cases.
2015-01-27OSX lacks HOST_NAME_MAX, has _POSIX_HOST_NAME_MAXDamien Miller
2014-09-03 - (djm) [defines.h sshbuf.c] Move __predict_true|false to defines.h andDamien Miller
conditionalise to avoid duplicate definition.
2014-06-16 - (dtucker) [defines.h] Fix undef of _PATH_MAILDIR. From rak at debian viaDarren Tucker
OpenSMTPD and chl@
2014-06-12 - (dtucker) [defines.h] Add va_copy if we don't already have it, taken fromDarren Tucker
2014-05-21 - (djm) [commit defines.h sshpty.c] don't attempt to useDamien Miller
vhangup on Linux. It doens't work for non-root users, and for them it just messes up the tty settings.
2014-05-15 - 2014/05/02 03:27:54Damien Miller
[chacha.h cipher-chachapoly.h digest.h hmac.h kex.h kexc25519.c] [misc.h poly1305.h ssh-pkcs11.c defines.h] revert __bounded change; it causes way more problems for portable than it solves; pointed out by dtucker@
2014-05-01 - (dtucker) [defines.h] Define __GNUC_PREREQ__ macro if we don't alreadyDarren Tucker
have it. Only attempt to use __attribute__(__bounded__) for gcc.
2014-04-20 - 2014/03/26 04:55:35Damien Miller
[chacha.h cipher-chachapoly.h digest.h hmac.h kex.h kexc25519.c [misc.h poly1305.h ssh-pkcs11.c] use __bounded(...) attribute recently added to sys/cdefs.h instead of longform __attribute__(__bounded(...)); for brevity and a warning free compilation with llvm/clang
2014-01-18 - (dtucker) [defines.h] Move our definitions of uintXX_t types down to afterDarren Tucker
they're defined if we have to define them ourselves. Fixes builds on old AIX.
2014-01-17 - (dtucker) [defines.h] Add typedefs for uintXX_t types for platforms thatDarren Tucker
don't have them.
2013-11-07 - (djm) [ defines.h] Skip arc4random_stir() calls on platformsDamien Miller
that lack it but have arc4random_uniform()
2013-11-03 - (dtucker) [ defines.h] Add typedefs for intmax_t and uintmax_tDarren Tucker
for platforms that don't have them.
2013-06-02 - (dtucker) [ defines.h] Test for fd_mask, howmany and NFDBITSDarren Tucker
rather than trying to enumerate the plaforms that don't have them. Based on a patch from Nathan Osman, with help from tim@.
2013-03-07 - (dtucker) [defines.h] Remove SIZEOF_CHAR bits since the test for it isDarren Tucker
was removed in rev 1.481 as it was redundant.
2012-12-0420121205Tim Rice
- (tim) [defines.h] Some platforms are missing ULLONG_MAX. Feedback djm@.
2012-02-14 - (tim) [defines.h] move chunk introduced in 1.125 before MAXPATHLEN soTim Rice
it actually works.
2011-09-29 - (djm) [ defines.h] No need to detect sizeof(char); patchDamien Miller
from des AT
2011-06-02 - (tim) [ defines.h] Run test program to detect system mailTim Rice
directory. Add --with-maildir option to override. Fixed OpenServer 6 getting it wrong. Fixed many systems having MAIL=/var/mail//username ok dtucker
2011-05-04 - (tim) [defines.h] Deal with platforms that do not have S_IFSOCK ok djm@Tim Rice
2011-05-05 - (djm) [defines.h] Move up include of netinet/ip.h for IPTOSDamien Miller
2011-01-17- (dtucker) [LICENCE audit-bsm.c audit-linux.c audit.c audit.hDarren Tucker defines.h loginrec.c] Bug #1402: add linux audit subsystem support, based on patches from Tomas Mraz and jchadima at redhat.
2010-11-24 - (djm) [defines.h] Add IP DSCP definesDamien Miller
2010-10-25 - (dtucker) [defines.h] Use SIZE_T_MAX for SIZE_MAX for platforms that have aDarren Tucker
native one.
2010-10-24 - (dtucker) [defines.h] Add SIZE_MAX for the benefit of platforms that don'tDarren Tucker
have it.