aboutsummaryrefslogtreecommitdiffstats
path: root/e_os.h
Commit message (Collapse)AuthorAgeFilesLines
* Change default directory for the .rnd file on Windows and VMSRichard Levitte2016-06-201-0/+2
| | | | | | | | | | The previous change for Windows wasn't quite right. Corrected to use %HOME%, %USERPROFILE% and %SYSTEMPROFILE%, in that order. Also adding the default home for VMS, SYS$LOGIN: Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Andy Polyakov <appro@openssl.org>
* Fix strdup macro redefinitionMat2016-05-301-1/+3
| | | | | | | | This fixes the following error when the CRT debug heap (crtdbg.h) is used: e_os.h(476): warning C4005: 'strdup': macro redefinition C:\Program Files (x86)\Windows Kits\10\Include\10.0.10586.0\ucrt\crtdbg.h(319): note: see previous definition of 'strdup' Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1137)
* Remove internal functions OPENSSL_strcasecmp and OPENSSL_strncasecmpRichard Levitte2016-05-281-6/+2
| | | | | | | | | | | | Their only reason to exist was that they didn't exist in VMS before version 7.0. We do not support such old versions any more. However, for the benefit of systems that don't get strings.h included by string.h, we include the former in e_os.h. RT#4458 Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Handle Visual C warning about non-standard function names.Richard Levitte2016-05-261-0/+7
| | | | | | | | | | | | | | | | | Visual C version from version 2003 complain about certain function names, for example: apps\apps.c(2572) : warning C4996: 'open': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _open. See online help for details. This adds preprocessor aliases for them in e_os.h. Additionally, crypto/conf/conf_lib.c needs to include e_os.h to catch those aliases. RT#4488 RT#4489 Reviewed-by: Matt Caswell <matt@openssl.org>
* Move Haiku configuration to separate config file to denoteAndy Polyakov2016-05-191-7/+0
| | | | | | the fact that it's community-supported target. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Manual fixes after copyright consolidationRich Salz2016-05-171-54/+6
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* DJGPP adjustmentsRichard Levitte2016-05-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Configure: Replaced -DTERMIO by -DTERMIOS in CFLAGS. * crypto/bio/bss_dgram.c [WATT32]: Remove obsolete redefinition of function names: sock_write, sock_read and sock_puts. * crypto/bio/bss_sock.c [WATT32]: For Watt-32 2.2.11 sock_write, sock_read and sock_puts are redefined to their private names so their names must be undefined first before they can be redefined again. * crypto/bio/bss_file.c (file_fopen) [__DJGPP__]: Make a copy of the passed file name and replace the leading dots in the dirname part and the basname part of the file name, unless LFN is supported. * e_os.h [__DJGPP__]: Undefine macro DEVRANDOM_EGD. Neither MS-DOS nor FreeDOS provide 'egd' sockets. New macro HAS_LFN_SUPPORT checks if underlying file system supports long file names or not. Include sys/un.h. Define WATT32_NO_OLDIES. * INSTALL.DJGPP: Update URL of WATT-32 library. Submitted by Juan Manuel Guerrero <juan.guerrero@gmx.de> RT#4217 Reviewed-by: Andy Polyakov <appro@openssl.org>
* Include winsock2.h even if compiling no-sockMatt Caswell2016-04-201-1/+1
| | | | | | | We need the struct timeval definition from winsock2.h even if we're not going to call any socket functions. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Cascade no-dgram from no-sock in Configure not e_os.hMatt Caswell2016-04-201-4/+0
| | | | | | | | e_os.h was defining OPENSSL_NO_DGRAM if OPENSSL_NO_SOCK was defined. This causes link problems on Windows because the generated .def files still contain the DGRAM symbols even though they have not been compiled. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add Haiku support.Jérôme Duval2016-04-141-0/+7
| | | | | | Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
* Clean-up *_DEBUG options.Andy Polyakov2016-04-071-4/+1
| | | | | | | | | Since NDEBUG is defined unconditionally on command line for release builds, we can omit *_DEBUG options in favour of effective "all-on" in debug builds exercised though CI. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Emilia Käsper <emilia@openssl.org>
* More Borland removal.Rich Salz2016-03-241-8/+0
| | | | | | And thanks to Miod Vallat for the nudge about ERR_PACK :) Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove Netware and OS/2Rich Salz2016-03-171-75/+0
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Allow OPENSSL_NO_SOCK in e_os.h even for non-Windows/DOS platformsDavid Woodhouse2016-03-101-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | UEFI needs this too. Don't keep it only in the Windows/DOS ifdef block. This is a fixed version of what was originally commit 963bb62195 and subsequently reverted in commit 37b1f8bd62. Somewhere along the way, the Windows/DOS ifdef actually got removed, leaving it just broken. It should have been turned into an #elif, not removed. This one correctly changes the logic from # if WINDOWS|DOS # if OPENSSL_NO_SOCK ... no-sock ... # elif !DJGPP ... native windows ... to # if OPENSSL_NO_SOCK ... no-sock ... # elif WINDOWS|DOS # if !DJGPP ... native windows ... Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
* OpenSSLDie --> OPENSSL_dieRich Salz2016-03-081-24/+2
| | | | | | Also removed a bunch of unused define's from e_os.h Reviewed-by: Richard Levitte <levitte@openssl.org>
* Revert "Allow OPENSSL_NO_SOCK in e_os.h even for non-Windows/DOS platforms"Rich Salz2016-03-071-1/+4
| | | | | | This reverts commit 963bb62195109fb863dc4d88c7470ce7f9af25ac. Reviewed-by: Tim Hudson <tjh@openssl.org>
* Allow OPENSSL_NO_SOCK in e_os.h even for non-Windows/DOS platformsDavid Woodhouse2016-03-071-4/+1
| | | | | | | UEFI needs this too. Don't keep it only in the Windows/DOS ifdef block. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
* ISSUE 43: Add BIO_sock_shutdownRich Salz2016-03-071-10/+0
| | | | | | This replaces SHUTDOWN/SHUTDOWN2 with BIO_closesocket. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove unused parameters from internal functionsRich Salz2016-02-221-0/+2
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Move to REF_DEBUG, for consistency.Rich Salz2016-02-111-7/+18
| | | | | | | Add utility macros REF_ASSERT_NOT and REF_PRINT_COUNT This is also RT 4181 Reviewed-by: Richard Levitte <levitte@openssl.org>
* Refactoring BIO: add wrappers around sockaddr et alRichard Levitte2016-02-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Because different platforms have different levels of support for IPv6, different kinds of sockaddr variants, and some have getaddrinfo et al while others don't, we could end up with a mess if ifdefs, duplicate code and other maintainance nightmares. Instead, we're introducing wrappers around the common form for socket communication: BIO_ADDR, closely related to struct sockaddr and some of its variants. BIO_ADDRINFO, closely related to struct addrinfo. With that comes support routines, both convenient creators and accessors, plus a few utility functions: BIO_parse_hostserv, takes a string of the form host:service and splits it into host and service. It checks for * in both parts, and converts any [ipv6-address] syntax to ust the IPv6 address. BIO_lookup, looks up information on a host. All routines handle IPv4 (AF_INET) and IPv6 (AF_INET6) addresses, and there is support for local sockets (AF_UNIX) as well. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* Remove /* foo.c */ commentsRich Salz2016-01-261-1/+0
| | | | | | | | | | | | This was done by the following find . -name '*.[ch]' | /tmp/pl where /tmp/pl is the following three-line script: print unless $. == 1 && m@/\* .*\.[ch] \*/@; close ARGV if eof; # Close file to reset $. And then some hand-editing of other files. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Add a no-egd option to disable EGD-related codeBenjamin Kaduk2016-01-141-1/+1
| | | | | | | | The entropy-gathering daemon is used only on a small number of machines. Provide a configure knob so that EGD support can be disabled by default but re-enabled on those systems that do need it. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* Simplify the EXIT macrot for VMSRichard Levitte2016-01-131-9/+4
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Have the VMS exit code follow POSIX conventionsRichard Levitte2016-01-131-0/+8
| | | | | | | | | | | | | | | | | | | | It seems like the convention for VMS exit codes is to combine the VMS C facility code (0x35a000) with a recoded exit code as follows: 0 => 1 1-255 => 8*code + 2 We also add 0x10000000, which is the control bit that has DCL not report the error on the terminal. That's just as well, since it would be quite nonsensical, for example: %C-W-NOMSG, Message number 0035A018 We could do all this by using the normal exit() function after having defined the macro _POSIX_EXIT. Unfortunately, this feature only exists in VMS C V7.1 and up. Reviewed-by: Rich Salz <rsalz@openssl.org>
* Add ossl_inlineDr. Stephen Henson2015-12-221-17/+0
| | | | | | | Add macro ossl_inline for use in public headers where a portable inline is required. Change existing inline to use ossl_inline Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* Configuratons: add -DFILIO_H to harmonized Solaris targets.Andy Polyakov2015-11-241-1/+1
| | | | | | Triggered by RT#4144. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
* e_os.h: __sun done right.Andy Polyakov2015-11-231-24/+4
| | | | | | RT #4144 Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
* Use defined(__sun) instead of defined(sun)Kurt Roeckx2015-11-221-2/+2
| | | | | | | | Strict ISO confirming C compilers only define __sun Reviewed-by: Viktor Dukhovni <openssl-users@dukhovni.org> RT #4144, MR #1353
* e_os.h: bump minimal _WIN32_WINNT.Andy Polyakov2015-11-181-11/+9
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Replace "SSLeay" in API with OpenSSLRich Salz2015-10-301-15/+11
| | | | | | | All instances of SSLeay (any combination of case) were replaced with the case-equivalent OpenSSL. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Explicitly cast INVALID_SOCKET to (int) to address warnings on Windows.Andy Polyakov2015-10-051-1/+3
| | | | | | | | | | | Even though SOCKET is effectively declared as (void *) on Windows, it's not actually a pointer, but an index within per-process table of kernel objects. The table size is actually limited and its upper limit is far below upper limit for signed 32-bit integer. This is what makes cast in question possible. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
* Fix no-stdio buildDavid Woodhouse2015-09-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Much related/similar work also done by Ivan Nestlerode <ivan.nestlerode@sonos.com> +Replace FILE BIO's with dummy ops that fail. +Include <stdio.h> for sscanf() even with no-stdio (since the declaration is there). We rely on sscanf() to parse the OPENSSL_ia32cap environment variable, since it can be larger than a 'long'. And we don't rely on the availability of strtoull(). +Remove OPENSSL_stderr(); not used. +Make OPENSSL_showfatal() do nothing (currently without stdio there's nothing we can do). +Remove file-based functionality from ssl/. The function prototypes were already gone, but not the functions themselves. +Remove unviable conf functionality via SYS_UEFI +Add fallback definition of BUFSIZ. +Remove functions taking FILE * from header files. +Add missing DECLARE_PEM_write_fp_const +Disable X509_LOOKUP_hash_dir(). X509_LOOKUP_file() was already compiled out, so remove its prototype. +Use OPENSSL_showfatal() in CRYPTO_destroy_dynlockid(). +Eliminate SRP_VBASE_init() and supporting functions. Users will need to build the verifier manually instead. +Eliminate compiler warning for unused do_pk8pkey_fp(). +Disable TEST_ENG_OPENSSL_PKEY. +Disable GOST engine as is uses [f]printf all over the place. +Eliminate compiler warning for unused send_fp_chars(). Signed-off-by: Rich Salz <rsalz@akamai.com> Reviewed-by: Tim Hudson <tjh@openssl.org>
* RT3969: Add OPENSSL_SYS_UEFIDavid Woodhouse2015-09-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This provides support for building in the EDK II reference implementation of UEFI. Most UEFI firmware in existence uses OpenSSL for implementing the core cryptographic functionality needed for Secure Boot. This has always previously been handled with external patches to OpenSSL but we are now making a concerted effort to eliminate those. In this mode, we don't actually use the OpenSSL makefiles; we process the MINFO file generated by 'make files' and incorporate it into the EDK2 build system. Since EDK II builds for various targets with varying word size and we need to have a single prepackaged configuration, we deliberately don't hard-code the setting of SIXTY_FOUR_BIT vs. THIRTY_TWO_BIT in opensslconf.h. We bypass that for OPENSSL_SYS_UEFI and allow EDK II itself to set those, depending on the architecture. For x86_64, EDK II sets SIXTY_FOUR_BIT and thus uses 'long long' for the 64-bit type, even when building with GCC where 'long' is also 64-bit. We do this because the Microsoft toolchain has 32-bit 'long'. Signed-off-by: Rich Salz <rsalz@akamai.com> Reviewed-by: Tim Hudson <tjh@openssl.org>
* Identify and move OpenSSL internal header filesRichard Levitte2015-05-141-2/+2
| | | | | | | | | | | | | | There are header files in crypto/ that are used by the rest of OpenSSL. Move those to include/internal and adapt the affected source code, Makefiles and scripts. The header files that got moved are: crypto/constant_time_locl.h crypto/o_dir.h crypto/o_str.h Reviewed-by: Matt Caswell <matt@openssl.org>
* Add OSSL_NELEM macro.Dr. Stephen Henson2015-05-031-0/+2
| | | | | | | Add OSSL_NELEM macro to e_os.h to determine the number of elements in an array. Reviewed-by: Tim Hudson <tjh@openssl.org>
* VMS adjustments:Richard Levitte2015-01-301-0/+1
| | | | | | | | Add new symbols that are longer than 31 chars to symhacks. VMS doesn't have <sys/un.h>, reflect that in e_os.h. MS_CALLBACK has been removed, ssl_task.c needs adjustment. Reviewed-by: Andy Polyakov <appro@openssl.org>
* ifdef cleanup part 3: OPENSSL_SYSNAMERich Salz2015-01-231-10/+0
| | | | | | | | Rename OPENSSL_SYSNAME_xxx to OPENSSL_SYS_xxx Remove MS_STATIC; it's a relic from platforms <32 bits. Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org>
* Run util/openssl-format-source -v -c .Matt Caswell2015-01-221-452/+466
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Cleanup OPENSSL_NO_xxx, part 1master-pre-reformatRich Salz2015-01-141-5/+0
| | | | | | | | | | OPENSSL_NO_RIPEMD160, OPENSSL_NO_RIPEMD merged into OPENSSL_NO_RMD160 OPENSSL_NO_FP_API merged into OPENSSL_NO_STDIO Two typo's on #endif comments fixed: OPENSSL_NO_ECB fixed to OPENSSL_NO_OCB OPENSSL_NO_HW_SureWare fixed to OPENSSL_NO_HW_SUREWARE Reviewed-by: Richard Levitte <levitte@openssl.org>
* Avoid deprecation problems in Visual Studio 13Matt Caswell2015-01-131-1/+3
| | | | Reviewed-by: Andy Polyakov <appro@openssl.org>
* RT3548: Remove unsupported platformsRich Salz2015-01-121-8/+0
| | | | | | | This last one for this ticket. Removes WIN16. So long, MS_CALLBACK and MS_FAR. We won't miss you. Reviewed-by: Richard Levitte <levitte@openssl.org>
* RT3546: Remove #define IRIX_CC_BUGRich Salz2015-01-051-7/+0
| | | | | | | Leftovers from commit 448155e9bbda27cbba365ff549a7e2044a8a399f Remove now-unused #define's Reviewed-by: Matt Caswell <matt@openssl.org>
* mark all block comments that need format preserving so thatTim Hudson2014-12-301-1/+2
| | | | | | | indent will not alter them when reformatting comments Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
* RT3548: Remove unsupported platformsRich Salz2014-12-281-2/+0
| | | | | | | | This commit removes DG-UX. It also flushes out some left-behinds in config. And regenerates TABLE from Configure (hadn't been done in awhile). Reviewed-by: Richard Levitte <levitte@openssl.org>
* RT3548: Remove unsupported platforms.Rich Salz2014-12-221-5/+0
| | | | | | This commit removes MPE/iX Reviewed-by: Andy Polyakov <appro@openssl.org>
* RT3548: Remove outdated platformsRich Salz2014-12-191-10/+0
| | | | | | This commit removes all mention of NeXT and NextStep. Reviewed-by: Richard Levitte <levitte@openssl.org>
* RT3548: Remove some obsolete platformsRich Salz2014-12-181-5/+1
| | | | | | This commit removes Sony NEWS4 Reviewed-by: Richard Levitte <levitte@openssl.org>
* RT3548: Remove some obsolete platformsRich Salz2014-12-171-18/+1
| | | | | | This commit removes BEOS. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Remove OPENSSL_FIPSCANISTER code.Dr. Stephen Henson2014-12-081-2/+0
| | | | | | | OPENSSL_FIPSCANISTER is only set if the fips module is being built (as opposed to being used). Since the fips module wont be built in master this is redundant. Reviewed-by: Tim Hudson <tjh@openssl.org>