aboutsummaryrefslogtreecommitdiff
path: root/e_os.h
AgeCommit message (Collapse)AuthorFilesLines
2016-06-20Change default directory for the .rnd file on Windows and VMSRichard Levitte1-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>
2016-05-30Fix strdup macro redefinitionMat1-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)
2016-05-28Remove internal functions OPENSSL_strcasecmp and OPENSSL_strncasecmpRichard Levitte1-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>
2016-05-26Handle Visual C warning about non-standard function names.Richard Levitte1-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>
2016-05-19Move Haiku configuration to separate config file to denoteAndy Polyakov1-7/+0
the fact that it's community-supported target. Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-05-17Manual fixes after copyright consolidationRich Salz1-54/+6
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-12DJGPP adjustmentsRichard Levitte1-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>
2016-04-20Include winsock2.h even if compiling no-sockMatt Caswell1-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>
2016-04-20Cascade no-dgram from no-sock in Configure not e_os.hMatt Caswell1-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>
2016-04-14Add Haiku support.Jérôme Duval1-0/+7
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-04-07Clean-up *_DEBUG options.Andy Polyakov1-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>
2016-03-24More Borland removal.Rich Salz1-8/+0
And thanks to Miod Vallat for the nudge about ERR_PACK :) Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-17Remove Netware and OS/2Rich Salz1-75/+0
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-10Allow OPENSSL_NO_SOCK in e_os.h even for non-Windows/DOS platformsDavid Woodhouse1-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>
2016-03-08OpenSSLDie --> OPENSSL_dieRich Salz1-24/+2
Also removed a bunch of unused define's from e_os.h Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-03-07Revert "Allow OPENSSL_NO_SOCK in e_os.h even for non-Windows/DOS platforms"Rich Salz1-1/+4
This reverts commit 963bb62195109fb863dc4d88c7470ce7f9af25ac. Reviewed-by: Tim Hudson <tjh@openssl.org>
2016-03-07Allow OPENSSL_NO_SOCK in e_os.h even for non-Windows/DOS platformsDavid Woodhouse1-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>
2016-03-07ISSUE 43: Add BIO_sock_shutdownRich Salz1-10/+0
This replaces SHUTDOWN/SHUTDOWN2 with BIO_closesocket. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-22Remove unused parameters from internal functionsRich Salz1-0/+2
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-11Move to REF_DEBUG, for consistency.Rich Salz1-7/+18
Add utility macros REF_ASSERT_NOT and REF_PRINT_COUNT This is also RT 4181 Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-03Refactoring BIO: add wrappers around sockaddr et alRichard Levitte1-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>
2016-01-26Remove /* foo.c */ commentsRich Salz1-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>
2016-01-14Add a no-egd option to disable EGD-related codeBenjamin Kaduk1-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>
2016-01-13Simplify the EXIT macrot for VMSRichard Levitte1-9/+4
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-13Have the VMS exit code follow POSIX conventionsRichard Levitte1-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>
2015-12-22Add ossl_inlineDr. Stephen Henson1-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>
2015-11-24Configuratons: add -DFILIO_H to harmonized Solaris targets.Andy Polyakov1-1/+1
Triggered by RT#4144. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-11-23e_os.h: __sun done right.Andy Polyakov1-24/+4
RT #4144 Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2015-11-22Use defined(__sun) instead of defined(sun)Kurt Roeckx1-2/+2
Strict ISO confirming C compilers only define __sun Reviewed-by: Viktor Dukhovni <openssl-users@dukhovni.org> RT #4144, MR #1353
2015-11-18e_os.h: bump minimal _WIN32_WINNT.Andy Polyakov1-11/+9
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-30Replace "SSLeay" in API with OpenSSLRich Salz1-15/+11
All instances of SSLeay (any combination of case) were replaced with the case-equivalent OpenSSL. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-10-05Explicitly cast INVALID_SOCKET to (int) to address warnings on Windows.Andy Polyakov1-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>
2015-09-29Fix no-stdio buildDavid Woodhouse1-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>
2015-09-08RT3969: Add OPENSSL_SYS_UEFIDavid Woodhouse1-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>
2015-05-14Identify and move OpenSSL internal header filesRichard Levitte1-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>
2015-05-03Add OSSL_NELEM macro.Dr. Stephen Henson1-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>
2015-01-30VMS adjustments:Richard Levitte1-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>
2015-01-23ifdef cleanup part 3: OPENSSL_SYSNAMERich Salz1-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>
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell1-452/+466
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-14Cleanup OPENSSL_NO_xxx, part 1master-pre-reformatRich Salz1-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>
2015-01-13Avoid deprecation problems in Visual Studio 13Matt Caswell1-1/+3
Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-01-12RT3548: Remove unsupported platformsRich Salz1-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>
2015-01-05RT3546: Remove #define IRIX_CC_BUGRich Salz1-7/+0
Leftovers from commit 448155e9bbda27cbba365ff549a7e2044a8a399f Remove now-unused #define's Reviewed-by: Matt Caswell <matt@openssl.org>
2014-12-30mark all block comments that need format preserving so thatTim Hudson1-1/+2
indent will not alter them when reformatting comments Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2014-12-28RT3548: Remove unsupported platformsRich Salz1-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>
2014-12-22RT3548: Remove unsupported platforms.Rich Salz1-5/+0
This commit removes MPE/iX Reviewed-by: Andy Polyakov <appro@openssl.org>
2014-12-19RT3548: Remove outdated platformsRich Salz1-10/+0
This commit removes all mention of NeXT and NextStep. Reviewed-by: Richard Levitte <levitte@openssl.org>
2014-12-18RT3548: Remove some obsolete platformsRich Salz1-5/+1
This commit removes Sony NEWS4 Reviewed-by: Richard Levitte <levitte@openssl.org>
2014-12-17RT3548: Remove some obsolete platformsRich Salz1-18/+1
This commit removes BEOS. Reviewed-by: Richard Levitte <levitte@openssl.org>
2014-12-08Remove OPENSSL_FIPSCANISTER code.Dr. Stephen Henson1-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>