summaryrefslogtreecommitdiff
path: root/defines.h
Commit message (Collapse)AuthorAgeFilesLines
* Correct value for IPTOS_DSCP_LE.Darren Tucker2021-12-151-2/+4
| | | | | It needs to allow for the preceeding two ECN bits. From daisuke.higashi at gmail.com via OpenSSH bz#3373, ok claudio@, job@, djm@.
* compat for timespecsub() and friendsDamien Miller2021-11-181-0/+33
|
* Check compiler for c99 declarations after code.Darren Tucker2021-08-181-3/+3
| | | | | The sntrup761 reference code contains c99-style declarations after code so don't try to build that if the compiler doesn't support it.
* Add configure-time detection for SSH_TIME_T_MAX.Darren Tucker2021-07-121-0/+6
| | | | | | | | Should fix printing cert times exceeding INT_MAX (bz#3329) on platforms were time_t is a long long. The limit used is for the signed type, so if some system has a 32bit unsigned time_t then the lower limit will still be imposed and we would need to add some way to detect this. Anyone using an unsigned 64bit can let us know when it starts being a problem.
* Disable sntrup761 if compiler doesn't support VLAs.Darren Tucker2021-01-261-0/+7
| | | | | | | | | | | 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 sntrup761x25519-sha512@openssh.com 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@.
* Remove HAVE_MMAP and BROKEN_MMAPSebastian Andrzej Siewior2020-09-111-4/+0
| | | | | | | | | | | | | 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 <sebastian@breakpoint.cc>
* Use LONG_LONG_MAX and friends if available.Darren Tucker2020-05-011-0/+7
| | | | | | | | | | | 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.
* Check if UINT32_MAX is defined before redefining.Darren Tucker2020-02-091-3/+5
|
* compat for missing IPTOS_DSCP_LE in system headersDamien Miller2020-01-281-0/+3
|
* Move definition of UINT32_MAX.Darren Tucker2020-01-261-3/+6
| | | | | This allows us to always define it if needed not just if we also define the type ourself.
* Add SSIZE_MAX when we define ssize_t.Darren Tucker2019-11-151-0/+1
|
* Define UINT32_MAX if needed.Darren Tucker2019-10-281-0/+3
|
* Make DEF_WEAK more likely to be correct.Darren Tucker2019-10-081-2/+3
| | | | | 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@
* Add more ToS bits, currently only used by netcat.Darren Tucker2019-09-241-0/+9
|
* remove realpath() compat replacementDamien Miller2019-07-081-4/+0
| | | | | | | | | | | | 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@
* Remove support for S/KeyDamien Miller2018-07-311-6/+0
| | | | | | 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.
* Remove UNICOS support.Darren Tucker2018-02-151-24/+0
| | | | | | | 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.
* portability for sftp globbed ls sort by mtimeDamien Miller2017-06-101-0/+7
| | | | | | 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.
* Define INT32_MAX and INT64_MAX if needed.Darren Tucker2017-05-011-0/+22
|
* Move DEF_WEAK into defines.h.Darren Tucker2016-10-151-0/+7
| | | | | As well pull in more recent changes from OpenBSD these will start to arrive so put it where the definition is shared.
* Remove obsolete CVS $Id from source files.Darren Tucker2016-08-171-3/+0
| | | | | Since -portable switched to git the CVS $Id tags are no longer being updated and are becoming increasingly misleading. Remove them.
* Move Cygwin IPPORT_RESERVED overrride to defines.hDarren Tucker2016-07-231-0/+13
| | | | Patch from vinschen at redhat.com.
* Prevent name collisions with system glob (bz#2463)Darren Tucker2015-10-291-0/+7
| | | | | | | 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 redhat.com, ok djm@
* Revert "define __unused to nothing if not already defined"Damien Miller2015-03-041-4/+0
| | | | | | This reverts commit 1598419e38afbaa8aa5df8dd6b0af98301e2c908. Some system headers have objects named __unused
* define __unused to nothing if not already definedDamien Miller2015-03-041-0/+4
| | | | fixes builds on BSD/OS
* Move definition of _NSIG.Darren Tucker2015-02-251-8/+0
| | | | | _NSIG is only unsed in one file, so move it there prevent redefinition warnings reported by Kevin Brott.
* include netdb.h to look for MAXHOSTNAMELEN; ok timDamien Miller2015-02-241-0/+1
|
* portability fix: if we can't dind a better define for HOST_NAME_MAX, use 255Tim Rice2015-02-231-0/+2
|
* More correct checking of HAVE_DECL_AI_NUMERICSERV.Darren Tucker2015-02-211-2/+4
|
* Add null declaration of AI_NUMERICINFO.Darren Tucker2015-02-211-0/+4
| | | | | | Some platforms (older FreeBSD and DragonFly versions) do have getaddrinfo() but do not have AI_NUMERICINFO. so define it to zero in those cases.
* OSX lacks HOST_NAME_MAX, has _POSIX_HOST_NAME_MAXDamien Miller2015-01-271-0/+8
|
* - (djm) [defines.h sshbuf.c] Move __predict_true|false to defines.h andDamien Miller2014-09-031-1/+12
| | | | conditionalise to avoid duplicate definition.
* - (dtucker) [defines.h] Fix undef of _PATH_MAILDIR. From rak at debian viaDarren Tucker2014-06-161-2/+2
| | | | OpenSMTPD and chl@
* - (dtucker) [defines.h] Add va_copy if we don't already have it, taken fromDarren Tucker2014-06-121-1/+9
| | | | openbsd-compat/bsd-asprintf.c.
* - (djm) [commit configure.ac defines.h sshpty.c] don't attempt to useDamien Miller2014-05-211-5/+1
| | | | | vhangup on Linux. It doens't work for non-root users, and for them it just messes up the tty settings.
* - djm@cvs.openbsd.org 2014/05/02 03:27:54Damien Miller2014-05-151-19/+1
| | | | | | | [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@
* - (dtucker) [defines.h] Define __GNUC_PREREQ__ macro if we don't alreadyDarren Tucker2014-05-011-2/+10
| | | | have it. Only attempt to use __attribute__(__bounded__) for gcc.
* - djm@cvs.openbsd.org 2014/03/26 04:55:35Damien Miller2014-04-201-1/+11
| | | | | | | | | [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
* - (dtucker) [defines.h] Move our definitions of uintXX_t types down to afterDarren Tucker2014-01-181-8/+8
| | | | | they're defined if we have to define them ourselves. Fixes builds on old AIX.
* - (dtucker) [defines.h] Add typedefs for uintXX_t types for platforms thatDarren Tucker2014-01-171-1/+8
| | | | don't have them.
* - (djm) [configure.ac defines.h] Skip arc4random_stir() calls on platformsDamien Miller2013-11-071-1/+10
| | | | that lack it but have arc4random_uniform()
* - (dtucker) [configure.ac defines.h] Add typedefs for intmax_t and uintmax_tDarren Tucker2013-11-031-1/+9
| | | | for platforms that don't have them.
* - (dtucker) [configure.ac defines.h] Test for fd_mask, howmany and NFDBITSDarren Tucker2013-06-021-13/+11
| | | | | rather than trying to enumerate the plaforms that don't have them. Based on a patch from Nathan Osman, with help from tim@.
* - (dtucker) [defines.h] Remove SIZEOF_CHAR bits since the test for it isDarren Tucker2013-03-071-5/+1
| | | | was removed in configure.ac rev 1.481 as it was redundant.
* 20121205Tim Rice2012-12-041-1/+5
| | | | - (tim) [defines.h] Some platforms are missing ULLONG_MAX. Feedback djm@.
* - (tim) [defines.h] move chunk introduced in 1.125 before MAXPATHLEN soTim Rice2012-02-141-7/+7
| | | | it actually works.
* - (djm) [configure.ac defines.h] No need to detect sizeof(char); patchDamien Miller2011-09-291-6/+2
| | | | from des AT des.no
* - (tim) [configure.ac defines.h] Run test program to detect system mailTim Rice2011-06-021-10/+7
| | | | | | directory. Add --with-maildir option to override. Fixed OpenServer 6 getting it wrong. Fixed many systems having MAIL=/var/mail//username ok dtucker
* - (tim) [defines.h] Deal with platforms that do not have S_IFSOCK ok djm@Tim Rice2011-05-041-1/+5
|
* - (djm) [defines.h] Move up include of netinet/ip.h for IPTOSDamien Miller2011-05-051-3/+3
| | | | definitions.