Module Name: src
Committed By: riastradh
Date: Mon Sep 9 15:15:24 UTC 2024
Modified Files:
src/include: stdlib.h
Log Message:
stdlib.h: Use same test for def. of lldiv_t as for decl. of lldiv(3).
The !_ANSI_SOURCE conditional was a leftover from before we had
_NETBSD_SOURCE in sys/featuretest.h already defined conditionally on
!_ANSI_SOURCE.
So just nix the !_ANSI_SOURCE part -- and while here, reorder and
reformat the conditional around lldiv_t so it matches the conditional
around lldiv(3) byte-for-byte, just to make it more obvious.
PR standards/56402: Definition of lldiv_t with ANSI_SOURCE and
POSIX_SOURCE
To generate a diff of this commit:
cvs rdiff -u -r1.125 -r1.126 src/include/stdlib.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/include/stdlib.h
diff -u src/include/stdlib.h:1.125 src/include/stdlib.h:1.126
--- src/include/stdlib.h:1.125 Fri Oct 28 09:43:59 2022
+++ src/include/stdlib.h Mon Sep 9 15:15:24 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: stdlib.h,v 1.125 2022/10/28 09:43:59 wiz Exp $ */
+/* $NetBSD: stdlib.h,v 1.126 2024/09/09 15:15:24 riastradh Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -63,9 +63,8 @@ typedef struct {
long rem; /* remainder */
} ldiv_t;
-#if !defined(_ANSI_SOURCE) && \
- (defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
- (__cplusplus - 0) >= 201103L || defined(_NETBSD_SOURCE))
+#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
+ defined(_NETBSD_SOURCE) || (__cplusplus - 0) >= 201103L
typedef struct {
/* LONGLONG */
long long int quot; /* quotient */