summaryrefslogtreecommitdiffstats
path: root/contrib/libs/zstd/programs/platform.h
diff options
context:
space:
mode:
authorthegeorg <[email protected]>2023-02-27 12:38:58 +0300
committerthegeorg <[email protected]>2023-02-27 12:38:58 +0300
commite82ffade6959fe8feaf41fe12a57d9f56873be40 (patch)
tree784bf61d9ca6cab4beabc995186d9b41e762ae60 /contrib/libs/zstd/programs/platform.h
parente58cceed352de42c1526ab4eecdfeee158b1ede3 (diff)
Update contrib/libs/zstd to 1.5.4
Diffstat (limited to 'contrib/libs/zstd/programs/platform.h')
-rw-r--r--contrib/libs/zstd/programs/platform.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/contrib/libs/zstd/programs/platform.h b/contrib/libs/zstd/programs/platform.h
index b858e3b484c..18a3587bfe2 100644
--- a/contrib/libs/zstd/programs/platform.h
+++ b/contrib/libs/zstd/programs/platform.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) Przemyslaw Skibinski, Yann Collet, Facebook, Inc.
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
* All rights reserved.
*
* This source code is licensed under both the BSD-style license (found in the
@@ -33,7 +33,7 @@ extern "C" {
/* **************************************
* Detect 64-bit OS
-* http://nadeausoftware.com/articles/2012/02/c_c_tip_how_detect_processor_type_using_compiler_predefined_macros
+* https://nadeausoftware.com/articles/2012/02/c_c_tip_how_detect_processor_type_using_compiler_predefined_macros
****************************************/
#if defined __ia64 || defined _M_IA64 /* Intel Itanium */ \
|| defined __powerpc64__ || defined __ppc64__ || defined __PPC64__ /* POWER 64-bit */ \
@@ -80,7 +80,7 @@ extern "C" {
* note: it's better to use unistd.h's _POSIX_VERSION whenever possible */
# define PLATFORM_POSIX_VERSION 200112L
-/* try to determine posix version through official unistd.h's _POSIX_VERSION (http://pubs.opengroup.org/onlinepubs/7908799/xsh/unistd.h.html).
+/* try to determine posix version through official unistd.h's _POSIX_VERSION (https://pubs.opengroup.org/onlinepubs/7908799/xsh/unistd.h.html).
* note : there is no simple way to know in advance if <unistd.h> is present or not on target system,
* Posix specification mandates its presence and its content, but target system must respect this spec.
* It's necessary to _not_ #include <unistd.h> whenever target OS is not unix-like
@@ -127,6 +127,10 @@ extern "C" {
/*-*********************************************
* Detect if isatty() and fileno() are available
+*
+* Note: Use UTIL_isConsole() for the zstd CLI
+* instead, as it allows faking is console for
+* testing.
************************************************/
#if (defined(__linux__) && (PLATFORM_POSIX_VERSION > 1)) \
|| (PLATFORM_POSIX_VERSION >= 200112L) \
@@ -192,13 +196,13 @@ static __inline int IS_CONSOLE(FILE* stdStream) {
#ifndef ZSTD_SETPRIORITY_SUPPORT
- /* mandates presence of <sys/resource.h> and support for setpriority() : http://man7.org/linux/man-pages/man2/setpriority.2.html */
+ /* mandates presence of <sys/resource.h> and support for setpriority() : https://man7.org/linux/man-pages/man2/setpriority.2.html */
# define ZSTD_SETPRIORITY_SUPPORT (PLATFORM_POSIX_VERSION >= 200112L)
#endif
#ifndef ZSTD_NANOSLEEP_SUPPORT
- /* mandates support of nanosleep() within <time.h> : http://man7.org/linux/man-pages/man2/nanosleep.2.html */
+ /* mandates support of nanosleep() within <time.h> : https://man7.org/linux/man-pages/man2/nanosleep.2.html */
# if (defined(__linux__) && (PLATFORM_POSIX_VERSION >= 199309L)) \
|| (PLATFORM_POSIX_VERSION >= 200112L)
# define ZSTD_NANOSLEEP_SUPPORT 1