/*
- * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
# include <openssl/e_os2.h>
# include <openssl/crypto.h>
-# include "internal/nelem.h"
+# include "internal/numbers.h" /* Ensure the definition of SIZE_MAX */
/*
* <openssl/e_os2.h> contains what we can justify to make visible to the
# undef stdin
# undef stdout
# undef stderr
-FILE *__iob_func();
+FILE *__iob_func(void);
# define stdin (&__iob_func()[0])
# define stdout (&__iob_func()[1])
# define stderr (&__iob_func()[2])
# endif
# define unlink _unlink
# define fileno _fileno
+# define isatty _isatty
# endif
# else
# include <strings.h>
# endif
/* end vxworks */
-/* system-specific variants defining ossl_sleep() */
-#ifdef OPENSSL_SYS_UNIX
-# include <unistd.h>
-static ossl_inline void ossl_sleep(unsigned long millis)
-{
-# ifdef OPENSSL_SYS_VXWORKS
- struct timespec ts;
- ts.tv_sec = (long int) (millis / 1000);
- ts.tv_nsec = (long int) (millis % 1000) * 1000000ul;
- nanosleep(&ts, NULL);
-# elif defined(__TANDEM)
-# if !defined(_REENTRANT)
-# include <cextdecs.h(PROCESS_DELAY_)>
- /* HPNS does not support usleep for non threaded apps */
- PROCESS_DELAY_(millis * 1000);
-# elif defined(_SPT_MODEL_)
-# include <spthread.h>
-# include <spt_extensions.h>
- usleep(millis * 1000);
-# else
- usleep(millis * 1000);
-# endif
-# else
- usleep(millis * 1000);
-# endif
-}
-#elif defined(_WIN32)
-# include <windows.h>
-static ossl_inline void ossl_sleep(unsigned long millis)
-{
- Sleep(millis);
-}
-#else
-/* Fallback to a busy wait */
-# include "internal/time.h"
-static ossl_inline void ossl_sleep(unsigned long millis)
-{
- const OSSL_TIME finish = ossl_time_add(ossl_time_now(), ossl_ms2time(millis));
-
- while (ossl_time_compare(ossl_time_now(), finish) < 0)
- /* busy wait */ ;
-}
-#endif /* defined OPENSSL_SYS_UNIX */
-
/* ----------------------------- HP NonStop -------------------------------- */
/* Required to support platform variant without getpid() and pid_t. */
# if defined(__TANDEM) && defined(_GUARDIAN_TARGET)
# define gethostbyname(name) gethostbyname((char*)name)
# define ioctlsocket(a,b,c) ioctl(a,b,c)
# ifdef NO_GETPID
-inline int nssgetpid();
+inline int nssgetpid(void);
# ifndef NSSGETPID_MACRO
# define NSSGETPID_MACRO
# include <cextdecs.h(PROCESSHANDLE_GETMINE_)>
# include <cextdecs.h(PROCESSHANDLE_DECOMPOSE_)>
- inline int nssgetpid()
+ inline int nssgetpid(void)
{
short phandle[10]={0};
union pseudo_pid {