Skip to content

Commit

Permalink
gcc13 does not define SSIZE_MAX
Browse files Browse the repository at this point in the history
Manually define it based on the length of the ssize_t type.

Fixes #12109

Signed-off-by: George Bosilca <bosilca@icl.utk.edu>
(cherry picked from commit fbea826)
  • Loading branch information
bosilca committed Jan 23, 2024
1 parent 9bd6041 commit 34506e0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions opal/include/opal_config_bottom.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* and Technology (RIST). All rights reserved.
* Copyright (c) 2015-2017 Intel, Inc. All rights reserved.
* Copyright (c) 2021 FUJITSU LIMITED. All rights reserved.
* Copyright (c) 2023 NVIDIA Corporation. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -568,6 +569,17 @@ typedef struct {
} opal_short_float_complex_t;
# endif

/* gcc 13 does not define SSIZE_MAX as required by the POSIX standard.
* As a workaround we define ours.
*/
#ifndef SSIZE_MAX
# if SIZEOF_SSIZE_T == SIZEOF_LONG
# define SSIZE_MAX LONG_MAX
# elif SIZEOF_SSIZE_T == SIZEOF_LONG_LONG
# define SSIZE_MAX LONG_LONG_MAX
# endif
#endif

#else

/* For a similar reason to what is listed in opal_config_top.h, we
Expand Down

0 comments on commit 34506e0

Please sign in to comment.