Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Configure
Original file line number Diff line number Diff line change
Expand Up @@ -1052,6 +1052,7 @@ i_quadmath=''
i_shadow=''
i_socks=''
i_stdbool=''
i_stdckdint=''
i_stdint=''
i_stdlib=''
i_sunmath=''
Expand Down Expand Up @@ -24226,6 +24227,10 @@ $rm_try
set i_stdbool
eval $setvar

: see if C23 stdckdint is available
set stdckdint.h i_stdckdint
eval $inhdr

: see if stdint is available
set stdint.h i_stdint
eval $inhdr
Expand Down Expand Up @@ -25636,6 +25641,7 @@ i_sgtty='$i_sgtty'
i_shadow='$i_shadow'
i_socks='$i_socks'
i_stdbool='$i_stdbool'
i_stdckdint='$i_stdckdint'
i_stdint='$i_stdint'
i_stdlib='$i_stdlib'
i_sunmath='$i_sunmath'
Expand Down
1 change: 1 addition & 0 deletions Cross/config.sh-arm-linux
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,7 @@ i_sgtty='undef'
i_shadow='define'
i_socks='undef'
i_stdbool='undef'
i_stdckdint='undef'
i_stdint='define'
i_stdlib='define'
i_sunmath='undef'
Expand Down
1 change: 1 addition & 0 deletions Cross/config.sh-arm-linux-n770
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,7 @@ i_sgtty='undef'
i_shadow='define'
i_socks='undef'
i_stdbool='undef'
i_stdckdint='undef'
i_stdint='define'
i_stdlib='define'
i_sunmath='undef'
Expand Down
5 changes: 5 additions & 0 deletions Porting/Glossary
Original file line number Diff line number Diff line change
Expand Up @@ -3722,6 +3722,11 @@ i_stdbool (i_stdbool.U):
indicates to the C program that <stdbool.h> exists and should
be included.

i_stdckdint (i_stdckdint.U):
This variable conditionally defines the I_STDCKDINT symbol, which
indicates to the C program that <stdckdint.h> exists and should
be included.

i_stdint (i_stdint.U):
This variable conditionally defines the I_STDINT symbol, which
indicates to the C program that <stdint.h> exists and should
Expand Down
1 change: 1 addition & 0 deletions Porting/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,7 @@ i_sgtty='undef'
i_shadow='define'
i_socks='define'
i_stdbool='define'
i_stdckdint='undef'
i_stdint='define'
i_stdlib='define'
i_sunmath='undef'
Expand Down
6 changes: 6 additions & 0 deletions config_h.SH
Original file line number Diff line number Diff line change
Expand Up @@ -3842,6 +3842,12 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
*/
#$i_stdbool I_STDBOOL /**/

/* I_STDCKDINT:
* This symbol, if defined, indicates that <stdckdint.h> exists and
* can be included.
*/
#$i_stdckdint I_STDCKDINT /**/

/* I_STDINT:
* This symbol, if defined, indicates that <stdint.h> exists and
* should be included.
Expand Down
7 changes: 7 additions & 0 deletions configure.com
Original file line number Diff line number Diff line change
Expand Up @@ -3667,6 +3667,12 @@ $ d_fd_set="define"
$ echo4 "Well, your system knows about the normal fd_set typedef..."
$ ENDIF
$!
$! Check for stdckdint.h
$!
$ tmp = "stdckdint.h"
$ GOSUB inhdr
$ i_stdckdint = tmp
$!
$! Check for stdint.h
$!
$ tmp = "stdint.h"
Expand Down Expand Up @@ -6550,6 +6556,7 @@ $ WC "i_stdbool='define'"
$ ELSE
$ WC "i_stdbool='undef'"
$ ENDIF
$ WC "i_stdckdint='" + i_stdckdint + "'"
$ WC "i_stdint='" + i_stdint + "'"
$ WC "i_stdlib='define'"
$ WC "i_sunmath='undef'"
Expand Down
10 changes: 4 additions & 6 deletions inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -3456,8 +3456,11 @@ S_lossless_NV_to_IV(const NV nv, IV *ivp)
# define IV_MUL_OVERFLOW_IS_EXPENSIVE (IVSIZE > PTRSIZE)
# endif

# ifdef I_STDCKDINT
# include <stdckdint.h>
# endif

# if defined(I_STDCKDINT) && !IV_ADD_SUB_OVERFLOW_IS_EXPENSIVE
/* XXX Preparation for upcoming C23, but I_STDCKDINT is not yet tested */
# define S_iv_add_may_overflow(il, ir, result) ckd_add(result, il, ir)
# elif defined(HAS_BUILTIN_ADD_OVERFLOW) && !IV_ADD_SUB_OVERFLOW_IS_EXPENSIVE
# define S_iv_add_may_overflow __builtin_add_overflow
Expand Down Expand Up @@ -3485,7 +3488,6 @@ S_iv_add_may_overflow (IV il, IV ir, IV *const result)
*/

# if defined(I_STDCKDINT)
/* XXX Preparation for upcoming C23, but I_STDCKDINT is not yet tested */
# define S_uv_add_overflow(auv, buv, result) ckd_add(result, auv, buv)
# elif defined(HAS_BUILTIN_ADD_OVERFLOW)
# define S_uv_add_overflow __builtin_add_overflow
Expand All @@ -3502,7 +3504,6 @@ S_uv_add_overflow (UV auv, UV buv, UV *const result)
# endif

# if defined(I_STDCKDINT) && !IV_ADD_SUB_OVERFLOW_IS_EXPENSIVE
/* XXX Preparation for upcoming C23, but I_STDCKDINT is not yet tested */
# define S_iv_sub_may_overflow(il, ir, result) ckd_sub(result, il, ir)
# elif defined(HAS_BUILTIN_SUB_OVERFLOW) && !IV_ADD_SUB_OVERFLOW_IS_EXPENSIVE
# define S_iv_sub_may_overflow __builtin_sub_overflow
Expand All @@ -3524,7 +3525,6 @@ S_iv_sub_may_overflow (IV il, IV ir, IV *const result)
# endif

# if defined(I_STDCKDINT)
/* XXX Preparation for upcoming C23, but I_STDCKDINT is not yet tested */
# define S_uv_sub_overflow(auv, buv, result) ckd_sub(result, auv, buv)
# elif defined(HAS_BUILTIN_SUB_OVERFLOW)
# define S_uv_sub_overflow __builtin_sub_overflow
Expand All @@ -3537,7 +3537,6 @@ S_uv_sub_overflow (UV auv, UV buv, UV *const result)
# endif

# if defined(I_STDCKDINT) && !IV_MUL_OVERFLOW_IS_EXPENSIVE
/* XXX Preparation for upcoming C23, but I_STDCKDINT is not yet tested */
# define S_iv_mul_may_overflow(il, ir, result) ckd_mul(result, il, ir)
# elif defined(HAS_BUILTIN_MUL_OVERFLOW) && !IV_MUL_OVERFLOW_IS_EXPENSIVE
# define S_iv_mul_may_overflow __builtin_mul_overflow
Expand Down Expand Up @@ -3565,7 +3564,6 @@ S_iv_mul_may_overflow (IV il, IV ir, IV *const result)
# endif

# if defined(I_STDCKDINT)
/* XXX Preparation for upcoming C23, but I_STDCKDINT is not yet tested */
# define S_uv_mul_overflow(auv, buv, result) ckd_mul(result, auv, buv)
# elif defined(HAS_BUILTIN_MUL_OVERFLOW)
# define S_uv_mul_overflow __builtin_mul_overflow
Expand Down
1 change: 1 addition & 0 deletions plan9/config_sh.sample
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,7 @@ i_sgtty='undef'
i_shadow='undef'
i_socks='undef'
i_stdbool='undef'
i_stdckdint='undef'
i_stdint='undef'
i_stdlib='define'
i_sunmath='undef'
Expand Down
4 changes: 4 additions & 0 deletions pod/perldelta.pod
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,10 @@ L</Platform Support> section, instead.

=item *

C23 F<< <stdckdint.h> >> and associated macros are now used if available.

=item *

XXX

=back
Expand Down
1 change: 1 addition & 0 deletions win32/config.gc
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,7 @@ i_sgtty='undef'
i_shadow='undef'
i_socks='undef'
i_stdbool='define'
i_stdckdint='undef'
i_stdint='define'
i_stdlib='define'
i_sunmath='undef'
Expand Down
1 change: 1 addition & 0 deletions win32/config.vc
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,7 @@ i_sgtty='undef'
i_shadow='undef'
i_socks='undef'
i_stdbool='undef'
i_stdckdint='undef'
i_stdint='undef'
i_stdlib='define'
i_sunmath='undef'
Expand Down
6 changes: 6 additions & 0 deletions win32/config_H.gc
Original file line number Diff line number Diff line change
Expand Up @@ -3801,6 +3801,12 @@
*/
#define I_STDBOOL /**/

/* I_STDCKDINT:
* This symbol, if defined, indicates that <stdckdint.h> exists and
* can be included.
*/
/*#define I_STDCKDINT / **/

/* I_STDINT:
* This symbol, if defined, indicates that <stdint.h> exists and
* should be included.
Expand Down
6 changes: 6 additions & 0 deletions win32/config_H.vc
Original file line number Diff line number Diff line change
Expand Up @@ -3801,6 +3801,12 @@
*/
/*#define I_STDBOOL / **/

/* I_STDCKDINT:
* This symbol, if defined, indicates that <stdckdint.h> exists and
* can be included.
*/
/*#define I_STDCKDINT / **/

/* I_STDINT:
* This symbol, if defined, indicates that <stdint.h> exists and
* should be included.
Expand Down
Loading