CVS commit: src/include/rpcsvc

2024-05-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu May 30 03:33:32 UTC 2024

Modified Files:
src/include/rpcsvc: yp_prot.h

Log Message:
Fix previous comment fix.

 It seems that the work "yppush" was not duplicated.
It was two sentences without period. To make it clear,
add a colon and a newline. Found by rillig@.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/include/rpcsvc/yp_prot.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include/rpcsvc

2024-05-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu May 30 03:33:32 UTC 2024

Modified Files:
src/include/rpcsvc: yp_prot.h

Log Message:
Fix previous comment fix.

 It seems that the work "yppush" was not duplicated.
It was two sentences without period. To make it clear,
add a colon and a newline. Found by rillig@.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/include/rpcsvc/yp_prot.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/rpcsvc/yp_prot.h
diff -u src/include/rpcsvc/yp_prot.h:1.21 src/include/rpcsvc/yp_prot.h:1.22
--- src/include/rpcsvc/yp_prot.h:1.21	Sun May 12 23:57:11 2024
+++ src/include/rpcsvc/yp_prot.h	Thu May 30 03:33:31 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: yp_prot.h,v 1.21 2024/05/12 23:57:11 msaitoh Exp $	*/
+/*	$NetBSD: yp_prot.h,v 1.22 2024/05/30 03:33:31 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993 Theo de Raadt 
@@ -264,8 +264,9 @@ struct ypbind_setdom {
  * YPPUSH PROTOCOL:
  * 
  * Sun says:
- * "Protocol between clients (ypxfr, only) and yppush
- *  speaks a protocol in the transient range, which
+ * "Protocol between clients (ypxfr, only) and yppush:
+ * 
+ *  yppush speaks a protocol in the transient range, which
  *  is supplied to ypxfr as a command-line parameter when it
  *  is activated by ypserv."
  * 



CVS commit: src/include/rpcsvc

2024-05-12 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun May 12 23:57:12 UTC 2024

Modified Files:
src/include/rpcsvc: yp_prot.h

Log Message:
Remove duplicated yppush.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/include/rpcsvc/yp_prot.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/rpcsvc/yp_prot.h
diff -u src/include/rpcsvc/yp_prot.h:1.20 src/include/rpcsvc/yp_prot.h:1.21
--- src/include/rpcsvc/yp_prot.h:1.20	Thu Apr  2 15:30:25 2020
+++ src/include/rpcsvc/yp_prot.h	Sun May 12 23:57:11 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: yp_prot.h,v 1.20 2020/04/02 15:30:25 msaitoh Exp $	*/
+/*	$NetBSD: yp_prot.h,v 1.21 2024/05/12 23:57:11 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993 Theo de Raadt 
@@ -265,7 +265,7 @@ struct ypbind_setdom {
  * 
  * Sun says:
  * "Protocol between clients (ypxfr, only) and yppush
- *  yppush speaks a protocol in the transient range, which
+ *  speaks a protocol in the transient range, which
  *  is supplied to ypxfr as a command-line parameter when it
  *  is activated by ypserv."
  * 



CVS commit: src/include/rpcsvc

2024-05-12 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun May 12 23:57:12 UTC 2024

Modified Files:
src/include/rpcsvc: yp_prot.h

Log Message:
Remove duplicated yppush.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/include/rpcsvc/yp_prot.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2024-05-12 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun May 12 10:41:23 UTC 2024

Modified Files:
src/include: bitstring.h

Log Message:
include/bitstring.h: remove CONSTCOND comment from do-while-0 loop

Lint doesn't need this comment anymore, as there is nothing surprising
or unusual about this idiom.

sed -Ei 's,} *while *\(/\* *CONSTCOND *\*/ *0\),} while (0),' *.h


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/include/bitstring.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/bitstring.h
diff -u src/include/bitstring.h:1.14 src/include/bitstring.h:1.15
--- src/include/bitstring.h:1.14	Thu Mar 17 02:25:32 2016
+++ src/include/bitstring.h	Sun May 12 10:41:23 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: bitstring.h,v 1.14 2016/03/17 02:25:32 christos Exp $	*/
+/*	$NetBSD: bitstring.h,v 1.15 2024/05/12 10:41:23 rillig Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -98,7 +98,7 @@ typedef	unsigned char bitstr_t;
 		bit_clear(_name, _start); \
 		_start++; \
 	} \
-} while(/*CONSTCOND*/0)
+} while (0)
 
 /* set bits start ... stop in bitstring */
 #define	bit_nset(name, start, stop) do { \
@@ -108,7 +108,7 @@ typedef	unsigned char bitstr_t;
 		bit_set(_name, _start); \
 		_start++; \
 	} \
-} while(/*CONSTCOND*/0)
+} while (0)
 
 /* find first bit clear in name */
 #define	bit_ffc(name, nbits, value) do { \
@@ -121,7 +121,7 @@ typedef	unsigned char bitstr_t;
 			break; \
 		} \
 	*(value) = _value; \
-} while(/*CONSTCOND*/0)
+} while (0)
 
 /* find first bit set in name */
 #define	bit_ffs(name, nbits, value) do { \
@@ -134,6 +134,6 @@ typedef	unsigned char bitstr_t;
 			break; \
 		} \
 	*(value) = _value; \
-} while(/*CONSTCOND*/0)
+} while (0)
 
 #endif /* !_BITSTRING_H_ */



CVS commit: src/include

2024-05-12 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sun May 12 10:41:23 UTC 2024

Modified Files:
src/include: bitstring.h

Log Message:
include/bitstring.h: remove CONSTCOND comment from do-while-0 loop

Lint doesn't need this comment anymore, as there is nothing surprising
or unusual about this idiom.

sed -Ei 's,} *while *\(/\* *CONSTCOND *\*/ *0\),} while (0),' *.h


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/include/bitstring.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2024-05-07 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue May  7 15:17:35 UTC 2024

Modified Files:
src/include: math.h

Log Message:
math.h: Move declarations under appropriate namespace tests.

Not sure about _REENTRANT, but if gamma_r and lgamma_r go under that
(even if _NETBSD_SOURCE isn't defined), then lgammal_r probably
should too.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/include/math.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/math.h
diff -u src/include/math.h:1.69 src/include/math.h:1.70
--- src/include/math.h:1.69	Mon Jan 22 14:01:50 2024
+++ src/include/math.h	Tue May  7 15:17:35 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: math.h,v 1.69 2024/01/22 14:01:50 kre Exp $	*/
+/*	$NetBSD: math.h,v 1.70 2024/05/07 15:17:35 riastradh Exp $	*/
 
 /*
  * 
@@ -501,6 +501,7 @@ long double fminl(long double, long doub
 #endif /* !_ANSI_SOURCE && ... */
 
 #if defined(_NETBSD_SOURCE)
+
 #ifndef __cplusplus
 int	matherr(struct exception *);
 #endif
@@ -515,6 +516,22 @@ double	significand(double);
  */
 double	drem(double, double);
 
+void		sincos(double, double *, double *);
+void		sincosf(float, float *, float *);
+void		sincosl(long double, long double *, long double *);
+
+double		cospi(double);
+float		cospif(float);
+long double	cospil(long double);
+
+double		sinpi(double);
+float		sinpif(float);
+long double	sinpil(long double);
+
+double		tanpi(double);
+float		tanpif(float);
+long double	tanpil(long double);
+
 #endif /* _NETBSD_SOURCE */
 
 #if defined(_NETBSD_SOURCE) || defined(_REENTRANT)
@@ -524,9 +541,9 @@ double	drem(double, double);
  */
 double	gamma_r(double, int *);
 double	lgamma_r(double, int *);
+long double	lgammal_r(long double, int *);
 #endif /* _NETBSD_SOURCE || _REENTRANT */
 
-
 #if defined(_NETBSD_SOURCE)
 
 /* float versions of ANSI/POSIX functions */
@@ -553,10 +570,6 @@ float	significandf(float);
  * float versions of BSD math library entry points
  */
 float	dremf(float, float);
-
-void		sincos(double, double *, double *);
-void		sincosf(float, float *, float *);
-void		sincosl(long double, long double *, long double *);
 #endif /* _NETBSD_SOURCE */
 
 #if defined(_NETBSD_SOURCE) || defined(_REENTRANT)
@@ -591,19 +604,6 @@ int	__isnanl(long double);
 int	__signbitl(long double);
 #endif
 
-/* XXX: Probable temporary hacks for new math functions - 20240122 */
-double	cospi(double);
-float	cospif(float);
-double	sinpi(double);
-float	sinpif(float);
-double	tanpi(double);
-float	tanpif(float);
-
-long double	cospil(long double);
-long double	lgammal_r(long double, int *);
-long double	sinpil(long double);
-long double	tanpil(long double);
-
 __END_DECLS
 
 #endif /* _MATH_H_ */



CVS commit: src/include

2024-05-07 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue May  7 15:17:35 UTC 2024

Modified Files:
src/include: math.h

Log Message:
math.h: Move declarations under appropriate namespace tests.

Not sure about _REENTRANT, but if gamma_r and lgamma_r go under that
(even if _NETBSD_SOURCE isn't defined), then lgammal_r probably
should too.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/include/math.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2024-02-16 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Fri Feb 16 11:13:59 UTC 2024

Modified Files:
src/include: netdb.h

Log Message:
Note that the NI_WITHSCOPEID flag is obsolete.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/include/netdb.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/netdb.h
diff -u src/include/netdb.h:1.71 src/include/netdb.h:1.72
--- src/include/netdb.h:1.71	Mon Aug  9 20:49:08 2021
+++ src/include/netdb.h	Fri Feb 16 11:13:59 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: netdb.h,v 1.71 2021/08/09 20:49:08 andvar Exp $	*/
+/*	$NetBSD: netdb.h,v 1.72 2024/02/16 11:13:59 jkoshy Exp $	*/
 
 /*
  * ++Copyright++ 1980, 1983, 1988, 1993
@@ -296,7 +296,7 @@ struct addrinfo {
 #define	NI_NAMEREQD	0x0004
 #define	NI_NUMERICSERV	0x0008
 #define	NI_DGRAM	0x0010
-#define	NI_WITHSCOPEID	0x0020
+#define	NI_WITHSCOPEID	0x0020	/* Obsolete. */
 #define	NI_NUMERICSCOPE	0x0040
 
 /*%



CVS commit: src/include

2024-02-16 Thread Joseph Koshy
Module Name:src
Committed By:   jkoshy
Date:   Fri Feb 16 11:13:59 UTC 2024

Modified Files:
src/include: netdb.h

Log Message:
Note that the NI_WITHSCOPEID flag is obsolete.


To generate a diff of this commit:
cvs rdiff -u -r1.71 -r1.72 src/include/netdb.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2024-01-22 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Jan 22 14:01:50 UTC 2024

Modified Files:
src/include: math.h

Log Message:
It seems that we need prototypes for long double math functions, even
when !__HAVE_LONG_DOUBLE -- they still exist, but just aren't...

This might unbreak several more builds.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/include/math.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2024-01-22 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Mon Jan 22 14:01:50 UTC 2024

Modified Files:
src/include: math.h

Log Message:
It seems that we need prototypes for long double math functions, even
when !__HAVE_LONG_DOUBLE -- they still exist, but just aren't...

This might unbreak several more builds.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/include/math.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/math.h
diff -u src/include/math.h:1.68 src/include/math.h:1.69
--- src/include/math.h:1.68	Mon Jan 22 12:15:19 2024
+++ src/include/math.h	Mon Jan 22 14:01:50 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: math.h,v 1.68 2024/01/22 12:15:19 kre Exp $	*/
+/*	$NetBSD: math.h,v 1.69 2024/01/22 14:01:50 kre Exp $	*/
 
 /*
  * 
@@ -599,12 +599,10 @@ float	sinpif(float);
 double	tanpi(double);
 float	tanpif(float);
 
-#ifdef __HAVE_LONG_DOUBLE
 long double	cospil(long double);
 long double	lgammal_r(long double, int *);
 long double	sinpil(long double);
 long double	tanpil(long double);
-#endif
 
 __END_DECLS
 



CVS commit: src/include

2024-01-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan 19 18:40:35 UTC 2024

Modified Files:
src/include: md2.h unistd.h

Log Message:
Add missing decls


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/include/md2.h
cvs rdiff -u -r1.163 -r1.164 src/include/unistd.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/md2.h
diff -u src/include/md2.h:1.8 src/include/md2.h:1.9
--- src/include/md2.h:1.8	Tue Aug  1 03:04:15 2023
+++ src/include/md2.h	Fri Jan 19 13:40:35 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: md2.h,v 1.8 2023/08/01 07:04:15 mrg Exp $	*/
+/*	$NetBSD: md2.h,v 1.9 2024/01/19 18:40:35 christos Exp $	*/
 
 #ifndef _MD2_H_
 #define _MD2_H_
@@ -25,6 +25,9 @@ char	*MD2End(MD2_CTX *, char[MD2_DIGEST_
 char	*MD2File(const char *, char *);
 char	*MD2FileChunk(const char *, char *, off_t, off_t);
 char	*MD2Data(const unsigned char *, size_t, char[MD2_DIGEST_STRING_LENGTH]);
+#ifdef _LIBC_INTERNAL
+void	MD2Transform(MD2_CTX *);
+#endif
 __END_DECLS
 
 #endif /* _MD2_H_ */

Index: src/include/unistd.h
diff -u src/include/unistd.h:1.163 src/include/unistd.h:1.164
--- src/include/unistd.h:1.163	Tue May 31 09:42:59 2022
+++ src/include/unistd.h	Fri Jan 19 13:40:35 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: unistd.h,v 1.163 2022/05/31 13:42:59 riastradh Exp $	*/
+/*	$NetBSD: unistd.h,v 1.164 2024/01/19 18:40:35 christos Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2008 The NetBSD Foundation, Inc.
@@ -414,5 +414,10 @@ extern	 int optreset;		/* getopt(3) exte
 extern	 char *suboptarg;	/* getsubopt(3) external variable */
 #endif
 
+#ifdef _LIBC_INTERNAL
+pid_t	__fork(void);
+pid_t	__locked_fork(int *) __weak;
+#endif
+
 __END_DECLS
 #endif /* !_UNISTD_H_ */



CVS commit: src/include

2024-01-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jan 19 18:40:35 UTC 2024

Modified Files:
src/include: md2.h unistd.h

Log Message:
Add missing decls


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/include/md2.h
cvs rdiff -u -r1.163 -r1.164 src/include/unistd.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include/ssp

2023-11-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov 15 03:14:16 UTC 2023

Modified Files:
src/include/ssp: ssp.h

Log Message:
Allow __ssp_inline to be overriden


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/include/ssp/ssp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include/ssp

2023-11-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov 15 03:14:16 UTC 2023

Modified Files:
src/include/ssp: ssp.h

Log Message:
Allow __ssp_inline to be overriden


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/include/ssp/ssp.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/ssp/ssp.h
diff -u src/include/ssp/ssp.h:1.15 src/include/ssp/ssp.h:1.16
--- src/include/ssp/ssp.h:1.15	Fri Nov 10 18:03:37 2023
+++ src/include/ssp/ssp.h	Tue Nov 14 22:14:16 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ssp.h,v 1.15 2023/11/10 23:03:37 christos Exp $	*/
+/*	$NetBSD: ssp.h,v 1.16 2023/11/15 03:14:16 christos Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2011, 2023 The NetBSD Foundation, Inc.
@@ -58,8 +58,10 @@
 #endif
 #define __ssp_real(fun)		__ssp_real_(fun)
 
+#ifndef __ssp_inline
 #define __ssp_inline extern __inline \
 __attribute__((__always_inline__, __gnu_inline__))
+#endif
 
 #if __SSP_FORTIFY_LEVEL > 2
 # define __ssp_bos(ptr) __builtin_dynamic_object_size(ptr, 1)



CVS commit: src/include/ssp

2023-11-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Nov 10 23:03:37 UTC 2023

Modified Files:
src/include/ssp: ssp.h

Log Message:
PR/57689: RVP: getcwd() not overridable with -D_FORTIFY_SOURCE


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/include/ssp/ssp.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/ssp/ssp.h
diff -u src/include/ssp/ssp.h:1.14 src/include/ssp/ssp.h:1.15
--- src/include/ssp/ssp.h:1.14	Wed Mar 29 09:37:10 2023
+++ src/include/ssp/ssp.h	Fri Nov 10 18:03:37 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ssp.h,v 1.14 2023/03/29 13:37:10 christos Exp $	*/
+/*	$NetBSD: ssp.h,v 1.15 2023/11/10 23:03:37 christos Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2011, 2023 The NetBSD Foundation, Inc.
@@ -58,7 +58,8 @@
 #endif
 #define __ssp_real(fun)		__ssp_real_(fun)
 
-#define __ssp_inline static __inline __attribute__((__always_inline__))
+#define __ssp_inline extern __inline \
+__attribute__((__always_inline__, __gnu_inline__))
 
 #if __SSP_FORTIFY_LEVEL > 2
 # define __ssp_bos(ptr) __builtin_dynamic_object_size(ptr, 1)



CVS commit: src/include/ssp

2023-11-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Nov 10 23:03:37 UTC 2023

Modified Files:
src/include/ssp: ssp.h

Log Message:
PR/57689: RVP: getcwd() not overridable with -D_FORTIFY_SOURCE


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/include/ssp/ssp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2023-09-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep 16 18:19:30 UTC 2023

Modified Files:
src/include: tzfile.h

Log Message:
sync with tzcode 2023c


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/include/tzfile.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/tzfile.h
diff -u src/include/tzfile.h:1.11 src/include/tzfile.h:1.12
--- src/include/tzfile.h:1.11	Tue Aug 16 05:03:04 2022
+++ src/include/tzfile.h	Sat Sep 16 14:19:30 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: tzfile.h,v 1.11 2022/08/16 09:03:04 christos Exp $	*/
+/*	$NetBSD: tzfile.h,v 1.12 2023/09/16 18:19:30 christos Exp $	*/
 
 #ifndef _TZFILE_H_
 #define _TZFILE_H_
@@ -102,20 +102,24 @@ struct tzhead {
 */
 
 #ifndef TZ_MAX_TIMES
+/* This must be at least 242 for Europe/London with 'zic -b fat'.  */
 # define TZ_MAX_TIMES 2000
 #endif /* !defined TZ_MAX_TIMES */
 
 #ifndef TZ_MAX_TYPES
-/* This must be at least 17 for Europe/Samara and Europe/Vilnius.  */
+/* This must be at least 18 for Europe/Vilnius with 'zic -b fat'.  */
 # define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */
 #endif /* !defined TZ_MAX_TYPES */
 
 #ifndef TZ_MAX_CHARS
+/* This must be at least 40 for America/Anchorage.  */
 # define TZ_MAX_CHARS 50	/* Maximum number of abbreviation characters */
 /* (limited by what unsigned chars can hold) */
 #endif /* !defined TZ_MAX_CHARS */
 
 #ifndef TZ_MAX_LEAPS
+/* This must be at least 27 for leap seconds from 1972 through mid-2023.
+   There's a plan to discontinue leap seconds by 2035.  */
 # define TZ_MAX_LEAPS 50	/* Maximum number of leap second corrections */
 #endif /* !defined TZ_MAX_LEAPS */
 



CVS commit: src/include

2023-09-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep 16 18:19:30 UTC 2023

Modified Files:
src/include: tzfile.h

Log Message:
sync with tzcode 2023c


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/include/tzfile.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2023-09-12 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Sep 12 22:08:24 UTC 2023

Modified Files:
src/include: assert.h

Log Message:
assert.h: remove custom macro definitions for lint mode

In lint mode, 'assert(cond)' expanded to nothing.  This broke code like
sqlite that assumes 'assert(cond)' expands to an expression that can be
used as operand of the comma operator, as in 'return assert(i > 0), i'.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/include/assert.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/assert.h
diff -u src/include/assert.h:1.25 src/include/assert.h:1.26
--- src/include/assert.h:1.25	Fri Apr 17 15:22:34 2020
+++ src/include/assert.h	Tue Sep 12 22:08:24 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: assert.h,v 1.25 2020/04/17 15:22:34 kamil Exp $	*/
+/*	$NetBSD: assert.h,v 1.26 2023/09/12 22:08:24 rillig Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -48,11 +48,7 @@
 #undef assert
 
 #ifdef NDEBUG
-# ifndef __lint__
-#  define assert(e)	(__static_cast(void,0))
-# else /* !__lint__ */
-#  define assert(e)
-# endif /* __lint__ */
+# define assert(e)	(__static_cast(void,0))
 #else /* !NDEBUG */
 # if __STDC__
 #  define assert(e)			\
@@ -67,11 +63,7 @@
 
 #undef _DIAGASSERT
 #if !defined(_DIAGNOSTIC)
-# if !defined(__lint__)
-#  define _DIAGASSERT(e) (__static_cast(void,0))
-# else /* !__lint__ */
-#  define _DIAGASSERT(e)
-# endif /* __lint__ */
+# define _DIAGASSERT(e) (__static_cast(void,0))
 #else /* _DIAGNOSTIC */
 # if __STDC__
 #  define _DIAGASSERT(e)		\
@@ -85,9 +77,7 @@
 #endif /* _DIAGNOSTIC */
 
 
-#if defined(__lint__)
-#define	__assert_function__	(__static_cast(const void *,0))
-#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
 #define	__assert_function__	__func__
 #elif __GNUC_PREREQ__(2, 6)
 #define	__assert_function__	__PRETTY_FUNCTION__



CVS commit: src/include

2023-09-12 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Sep 12 22:08:24 UTC 2023

Modified Files:
src/include: assert.h

Log Message:
assert.h: remove custom macro definitions for lint mode

In lint mode, 'assert(cond)' expanded to nothing.  This broke code like
sqlite that assumes 'assert(cond)' expands to an expression that can be
used as operand of the comma operator, as in 'return assert(i > 0), i'.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/include/assert.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2023-08-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Aug 19 08:54:36 UTC 2023

Modified Files:
src/include: time.h

Log Message:
time.h: fix typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/include/time.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/time.h
diff -u src/include/time.h:1.48 src/include/time.h:1.49
--- src/include/time.h:1.48	Sun Oct 23 15:43:40 2022
+++ src/include/time.h	Sat Aug 19 08:54:36 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: time.h,v 1.48 2022/10/23 15:43:40 jschauma Exp $	*/
+/*	$NetBSD: time.h,v 1.49 2023/08/19 08:54:36 rillig Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -81,7 +81,7 @@ struct tm {
 	int	tm_year;	/* years since 1900 */
 	int	tm_wday;	/* days since Sunday [0-6] */
 	int	tm_yday;	/* days since January 1 [0-365] */
-	int	tm_isdst;	/* Daylight Savings Time flag */
+	int	tm_isdst;	/* Daylight Saving Time flag */
 	long	tm_gmtoff;	/* offset from UTC in seconds */
 	__aconst char *tm_zone;	/* timezone abbreviation */
 };



CVS commit: src/include

2023-08-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Aug 19 08:54:36 UTC 2023

Modified Files:
src/include: time.h

Log Message:
time.h: fix typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/include/time.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include/arpa

2023-05-23 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Tue May 23 10:22:42 UTC 2023

Modified Files:
src/include/arpa: nameser.h

Log Message:
s/configuratin/configuration/ in comment, from Brad Harder (bch) by email.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/include/arpa/nameser.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include/arpa

2023-05-23 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Tue May 23 10:22:42 UTC 2023

Modified Files:
src/include/arpa: nameser.h

Log Message:
s/configuratin/configuration/ in comment, from Brad Harder (bch) by email.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/include/arpa/nameser.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/arpa/nameser.h
diff -u src/include/arpa/nameser.h:1.27 src/include/arpa/nameser.h:1.28
--- src/include/arpa/nameser.h:1.27	Wed Dec  8 20:50:01 2021
+++ src/include/arpa/nameser.h	Tue May 23 10:22:42 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: nameser.h,v 1.27 2021/12/08 20:50:01 andvar Exp $	*/
+/*	$NetBSD: nameser.h,v 1.28 2023/05/23 10:22:42 andvar Exp $	*/
 
 /*
  * Portions Copyright (C) 2004, 2005, 2008, 2009  Internet Systems Consortium, Inc. ("ISC")
@@ -343,7 +343,7 @@ typedef enum __ns_type {
 	ns_t_rrsig = 46,	/*%< RRset Signature */
 	ns_t_nsec = 47,		/*%< Negative security */
 	ns_t_dnskey = 48,	/*%< DNS Key */
-	ns_t_dhcid = 49,	/*%< Dynamic host configuratin identifier */
+	ns_t_dhcid = 49,	/*%< Dynamic host configuration identifier */
 	ns_t_nsec3 = 50,	/*%< Negative security type 3 */
 	ns_t_nsec3param = 51,	/*%< Negative security type 3 parameters */
 	ns_t_hip = 55,		/*%< Host Identity Protocol */



CVS commit: src/include/ssp

2023-03-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 29 13:37:10 UTC 2023

Modified Files:
src/include/ssp: ssp.h

Log Message:
PR/57288: Mingye Wang: : Use __builtin_dynamic_object_size
for LLVM > 9 and GCC > 12, introducing _SSP_FORTIFY_LEVEL == 3


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/include/ssp/ssp.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/ssp/ssp.h
diff -u src/include/ssp/ssp.h:1.13 src/include/ssp/ssp.h:1.14
--- src/include/ssp/ssp.h:1.13	Thu Sep  3 16:43:47 2015
+++ src/include/ssp/ssp.h	Wed Mar 29 09:37:10 2023
@@ -1,7 +1,7 @@
-/*	$NetBSD: ssp.h,v 1.13 2015/09/03 20:43:47 plunky Exp $	*/
+/*	$NetBSD: ssp.h,v 1.14 2023/03/29 13:37:10 christos Exp $	*/
 
 /*-
- * Copyright (c) 2006, 2011 The NetBSD Foundation, Inc.
+ * Copyright (c) 2006, 2011, 2023 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
@@ -36,7 +36,9 @@
 #if !defined(__cplusplus)
 # if _FORTIFY_SOURCE > 0 && !defined(__lint__) && \
  (__OPTIMIZE__ > 0 || defined(__clang__)) && __GNUC_PREREQ__(4, 1)
-#  if _FORTIFY_SOURCE > 1
+#  if _FORTIFY_SOURCE > 2 && __has_builtin(__builtin_dynamic_object_size)
+#   define __SSP_FORTIFY_LEVEL 3
+#  elif _FORTIFY_SOURCE > 1
 #   define __SSP_FORTIFY_LEVEL 2
 #  else
 #   define __SSP_FORTIFY_LEVEL 1
@@ -58,8 +60,13 @@
 
 #define __ssp_inline static __inline __attribute__((__always_inline__))
 
-#define __ssp_bos(ptr) __builtin_object_size(ptr, __SSP_FORTIFY_LEVEL > 1)
-#define __ssp_bos0(ptr) __builtin_object_size(ptr, 0)
+#if __SSP_FORTIFY_LEVEL > 2
+# define __ssp_bos(ptr) __builtin_dynamic_object_size(ptr, 1)
+# define __ssp_bos0(ptr) __builtin_dynamic_object_size(ptr, 0)
+#else
+# define __ssp_bos(ptr) __builtin_object_size(ptr, __SSP_FORTIFY_LEVEL > 1)
+# define __ssp_bos0(ptr) __builtin_object_size(ptr, 0)
+#endif
 
 #define __ssp_check(buf, len, bos) \
 	if (bos(buf) != (size_t)-1 && len > bos(buf)) \



CVS commit: src/include/ssp

2023-03-29 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Mar 29 13:37:10 UTC 2023

Modified Files:
src/include/ssp: ssp.h

Log Message:
PR/57288: Mingye Wang: : Use __builtin_dynamic_object_size
for LLVM > 9 and GCC > 12, introducing _SSP_FORTIFY_LEVEL == 3


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/include/ssp/ssp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2022-12-28 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Wed Dec 28 11:51:22 UTC 2022

Modified Files:
src/include: dirent.h

Log Message:
scandir(3) and alphasort(3) are part of POSIX-2008, so don't require
_NETBSD_SOURCE to use them.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/include/dirent.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/dirent.h
diff -u src/include/dirent.h:1.37 src/include/dirent.h:1.38
--- src/include/dirent.h:1.37	Thu Dec 30 16:20:19 2021
+++ src/include/dirent.h	Wed Dec 28 11:51:21 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: dirent.h,v 1.37 2021/12/30 16:20:19 nros Exp $	*/
+/*	$NetBSD: dirent.h,v 1.38 2022/12/28 11:51:21 nia Exp $	*/
 
 /*-
  * Copyright (c) 1989, 1993
@@ -108,19 +108,19 @@ long telldir(DIR *);
 defined(_NETBSD_SOURCE)
 #ifndef __LIBC12_SOURCE__
 DIR *fdopendir(int);
-#endif
-#endif
-#if defined(_NETBSD_SOURCE)
-#ifndef __LIBC12_SOURCE__
-DIR *__opendir2(const char *, int) __RENAME(__opendir230);
 int scandir(const char *, struct dirent ***,
 int (*)(const struct dirent *), int (*)(const struct dirent **,
 const struct dirent **))
 __RENAME(__scandir30);
-int getdents(int, char *, size_t) __RENAME(__getdents30);
 int alphasort(const struct dirent **, const struct dirent **)
 __RENAME(__alphasort30);
 #endif
+#endif
+#if defined(_NETBSD_SOURCE)
+#ifndef __LIBC12_SOURCE__
+DIR *__opendir2(const char *, int) __RENAME(__opendir230);
+int getdents(int, char *, size_t) __RENAME(__getdents30);
+#endif
 #endif /* defined(_NETBSD_SOURCE) */
 __END_DECLS
 



CVS commit: src/include

2022-12-28 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Wed Dec 28 11:51:22 UTC 2022

Modified Files:
src/include: dirent.h

Log Message:
scandir(3) and alphasort(3) are part of POSIX-2008, so don't require
_NETBSD_SOURCE to use them.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/include/dirent.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2022-10-05 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Wed Oct  5 12:09:07 UTC 2022

Modified Files:
src/include: stdlib.h

Log Message:
Remove hacky gcc2-specific alloca definition.


To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 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.123 src/include/stdlib.h:1.124
--- src/include/stdlib.h:1.123	Sat Jul  3 14:07:13 2021
+++ src/include/stdlib.h	Wed Oct  5 12:09:07 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: stdlib.h,v 1.123 2021/07/03 14:07:13 christos Exp $	*/
+/*	$NetBSD: stdlib.h,v 1.124 2022/10/05 12:09:07 nia Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -269,10 +269,7 @@ int	 getsubopt(char **, char * const *, 
  * Implementation-defined extensions
  */
 #if defined(_NETBSD_SOURCE)
-#if defined(alloca) && (alloca == __builtin_alloca) && \
-	defined(__GNUC__) && (__GNUC__ < 2)
-void	*alloca(int); /* built-in for gcc */
-#elif defined(__PCC__) && !defined(__GNUC__)
+#if defined(__PCC__) && !defined(__GNUC__)
 #define alloca(size) __builtin_alloca(size)
 #else
 void	*alloca(size_t);



CVS commit: src/include

2022-10-05 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Wed Oct  5 12:09:07 UTC 2022

Modified Files:
src/include: stdlib.h

Log Message:
Remove hacky gcc2-specific alloca definition.


To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 src/include/stdlib.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2022-08-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Aug 16 09:03:04 UTC 2022

Modified Files:
src/include: tzfile.h

Log Message:
whitespace changes from tzcode2022a->tzcode2022b


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/include/tzfile.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2022-08-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Aug 16 09:03:04 UTC 2022

Modified Files:
src/include: tzfile.h

Log Message:
whitespace changes from tzcode2022a->tzcode2022b


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/include/tzfile.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/tzfile.h
diff -u src/include/tzfile.h:1.10 src/include/tzfile.h:1.11
--- src/include/tzfile.h:1.10	Wed Jul  3 11:49:21 2019
+++ src/include/tzfile.h	Tue Aug 16 05:03:04 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: tzfile.h,v 1.10 2019/07/03 15:49:21 christos Exp $	*/
+/*	$NetBSD: tzfile.h,v 1.11 2022/08/16 09:03:04 christos Exp $	*/
 
 #ifndef _TZFILE_H_
 #define _TZFILE_H_
@@ -21,15 +21,15 @@
 */
 
 #ifndef TZDIR		/* Time zone object file directory */
-#define TZDIR		"/usr/share/zoneinfo"
+# define TZDIR		"/usr/share/zoneinfo"
 #endif /* !defined TZDIR */
 
 #ifndef TZDEFAULT
-#define TZDEFAULT	"/etc/localtime"
+# define TZDEFAULT	"/etc/localtime"
 #endif /* !defined TZDEFAULT */
 
 #ifndef TZDEFRULES
-#define TZDEFRULES	"posixrules"
+# define TZDEFRULES	"posixrules"
 #endif /* !defined TZDEFRULES */
 
 
@@ -102,21 +102,21 @@ struct tzhead {
 */
 
 #ifndef TZ_MAX_TIMES
-#define TZ_MAX_TIMES	2000
+# define TZ_MAX_TIMES 2000
 #endif /* !defined TZ_MAX_TIMES */
 
 #ifndef TZ_MAX_TYPES
 /* This must be at least 17 for Europe/Samara and Europe/Vilnius.  */
-#define TZ_MAX_TYPES	256 /* Limited by what (unsigned char)'s can hold */
+# define TZ_MAX_TYPES 256 /* Limited by what (unsigned char)'s can hold */
 #endif /* !defined TZ_MAX_TYPES */
 
 #ifndef TZ_MAX_CHARS
-#define TZ_MAX_CHARS	50	/* Maximum number of abbreviation characters */
+# define TZ_MAX_CHARS 50	/* Maximum number of abbreviation characters */
 /* (limited by what unsigned chars can hold) */
 #endif /* !defined TZ_MAX_CHARS */
 
 #ifndef TZ_MAX_LEAPS
-#define TZ_MAX_LEAPS	50	/* Maximum number of leap second corrections */
+# define TZ_MAX_LEAPS 50	/* Maximum number of leap second corrections */
 #endif /* !defined TZ_MAX_LEAPS */
 
 #define SECSPERMIN	60



CVS commit: src/include

2022-08-01 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Aug  1 15:16:05 UTC 2022

Modified Files:
src/include: sched.h

Log Message:
sched.h: keep __clone() visible under _NETBSD_SOURCE


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/include/sched.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/sched.h
diff -u src/include/sched.h:1.14 src/include/sched.h:1.15
--- src/include/sched.h:1.14	Mon Aug  1 14:34:01 2022
+++ src/include/sched.h	Mon Aug  1 15:16:05 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: sched.h,v 1.14 2022/08/01 14:34:01 wiz Exp $	*/
+/*	$NetBSD: sched.h,v 1.15 2022/08/01 15:16:05 wiz Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -73,13 +73,17 @@ int	sched_setaffinity_np(pid_t, size_t, 
 
 /*
  * Historical functions, not defined in standard
- * Linux man page documents these functions as only available when
+ * Linux man page documents clone() as only available when
  * _GNU_SOURCE is defined
  */
 pid_t	 clone(int (*)(void *), void *, int, void *);
+#endif /* _GNU_SOURCE */
+
+#if defined(_NETBSD_SOURCE)
+
 pid_t	__clone(int (*)(void *), void *, int, void *);
 
-#endif /* _GNU_SOURCE */
+#endif /* _NETBSD_SOURCE */
 
 __END_DECLS
 



CVS commit: src/include

2022-08-01 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Aug  1 15:16:05 UTC 2022

Modified Files:
src/include: sched.h

Log Message:
sched.h: keep __clone() visible under _NETBSD_SOURCE


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/include/sched.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2022-08-01 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Aug  1 14:34:02 UTC 2022

Modified Files:
src/include: sched.h

Log Message:
sched.h: format comment to follow KNF

requested by thorpej@


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/include/sched.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/sched.h
diff -u src/include/sched.h:1.13 src/include/sched.h:1.14
--- src/include/sched.h:1.13	Mon Aug  1 14:19:40 2022
+++ src/include/sched.h	Mon Aug  1 14:34:01 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: sched.h,v 1.13 2022/08/01 14:19:40 wiz Exp $	*/
+/*	$NetBSD: sched.h,v 1.14 2022/08/01 14:34:01 wiz Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -71,9 +71,11 @@ int	sched_setaffinity_np(pid_t, size_t, 
 
 #if defined(_GNU_SOURCE)
 
-/* Historical functions, not defined in standard */
-/* Linux man page documents these functions as only available when
- * _GNU_SOURCE is defined */
+/*
+ * Historical functions, not defined in standard
+ * Linux man page documents these functions as only available when
+ * _GNU_SOURCE is defined
+ */
 pid_t	 clone(int (*)(void *), void *, int, void *);
 pid_t	__clone(int (*)(void *), void *, int, void *);
 



CVS commit: src/include

2022-08-01 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Aug  1 14:34:02 UTC 2022

Modified Files:
src/include: sched.h

Log Message:
sched.h: format comment to follow KNF

requested by thorpej@


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/include/sched.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2022-08-01 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Aug  1 14:19:40 UTC 2022

Modified Files:
src/include: sched.h

Log Message:
sched.h: Linux documents clone and __clone as only available
when_GNU_SOURCE is defined - follow suit.

Ok martin@


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/include/sched.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2022-08-01 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Aug  1 14:19:40 UTC 2022

Modified Files:
src/include: sched.h

Log Message:
sched.h: Linux documents clone and __clone as only available
when_GNU_SOURCE is defined - follow suit.

Ok martin@


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/include/sched.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/sched.h
diff -u src/include/sched.h:1.12 src/include/sched.h:1.13
--- src/include/sched.h:1.12	Sun Jan 11 03:04:12 2009
+++ src/include/sched.h	Mon Aug  1 14:19:40 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: sched.h,v 1.12 2009/01/11 03:04:12 christos Exp $	*/
+/*	$NetBSD: sched.h,v 1.13 2022/08/01 14:19:40 wiz Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -59,20 +59,26 @@ __END_DECLS
 #define sched_yield		__libc_thr_yield
 #endif /* __LIBPTHREAD_SOURCE__ */
 
-#if defined(_NETBSD_SOURCE)
-
 __BEGIN_DECLS
 
+#if defined(_NETBSD_SOURCE)
+
 /* Process affinity functions (not portable) */
 int	sched_getaffinity_np(pid_t, size_t, cpuset_t *);
 int	sched_setaffinity_np(pid_t, size_t, cpuset_t *);
 
+#endif /* _NETBSD_SOURCE */
+
+#if defined(_GNU_SOURCE)
+
 /* Historical functions, not defined in standard */
+/* Linux man page documents these functions as only available when
+ * _GNU_SOURCE is defined */
 pid_t	 clone(int (*)(void *), void *, int, void *);
 pid_t	__clone(int (*)(void *), void *, int, void *);
 
-__END_DECLS
+#endif /* _GNU_SOURCE */
 
-#endif /* _NETBSD_SOURCE */
+__END_DECLS
 
 #endif /* _SCHED_H_ */



CVS commit: src/include/arpa

2022-04-20 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Thu Apr 21 04:03:54 UTC 2022

Modified Files:
src/include/arpa: nameser_compat.h

Log Message:
nameser_compat.h: simplify logic to determine byte order

There's really no need for all the complex #ifdefs present and, on top
of that, it didn't even work correctly for all NetBSD architectures.
Simply use endian.h and drop the rest. (Since there is no upstream for
this code anymore, there's no concern about complicating future merges,
either. This change is also consistent with what FreeBSD and OpenBSD
did years ago.)

Addresses PR toolchain/53880 (reported by maya@, originally encountered
by me on macppc when building a package that pulls in nameser_compat.h
before nameser.h by necessity -- necessity, that is, on another OS).


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/include/arpa/nameser_compat.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include/arpa

2022-04-20 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Thu Apr 21 04:03:54 UTC 2022

Modified Files:
src/include/arpa: nameser_compat.h

Log Message:
nameser_compat.h: simplify logic to determine byte order

There's really no need for all the complex #ifdefs present and, on top
of that, it didn't even work correctly for all NetBSD architectures.
Simply use endian.h and drop the rest. (Since there is no upstream for
this code anymore, there's no concern about complicating future merges,
either. This change is also consistent with what FreeBSD and OpenBSD
did years ago.)

Addresses PR toolchain/53880 (reported by maya@, originally encountered
by me on macppc when building a package that pulls in nameser_compat.h
before nameser.h by necessity -- necessity, that is, on another OS).


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/include/arpa/nameser_compat.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/arpa/nameser_compat.h
diff -u src/include/arpa/nameser_compat.h:1.8 src/include/arpa/nameser_compat.h:1.9
--- src/include/arpa/nameser_compat.h:1.8	Wed Nov 18 12:49:52 2020
+++ src/include/arpa/nameser_compat.h	Thu Apr 21 04:03:54 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: nameser_compat.h,v 1.8 2020/11/18 12:49:52 is Exp $	*/
+/*	$NetBSD: nameser_compat.h,v 1.9 2022/04/21 04:03:54 gutteridge Exp $	*/
 
 /* Copyright (c) 1983, 1989
  *The Regents of the University of California.  All rights reserved.
@@ -36,53 +36,19 @@
 #ifndef _ARPA_NAMESER_COMPAT_
 #define	_ARPA_NAMESER_COMPAT_
 
-#define	__BIND		19950621	/*%< (DEAD) interface version stamp. */
+#include 
 
-#ifndef BYTE_ORDER
-#if (BSD >= 199103)
-# include 
-#else
-#ifdef __linux
-# include 
-#else
-#define	LITTLE_ENDIAN	1234	/*%< least-significant byte first (vax, pc) */
-#define	BIG_ENDIAN	4321	/*%< most-significant byte first (IBM, net) */
-#define	PDP_ENDIAN	3412	/*%< LSB first in word, MSW first in long (pdp) */
-
-#if defined(vax) || defined(ns32000) || defined(sun386) || defined(i386) || \
-defined(MIPSEL) || defined(_MIPSEL) || defined(BIT_ZERO_ON_RIGHT) || \
-defined(__i386__) || defined(__i386) || defined(__amd64__) || \
-defined(__x86_64__) || defined(MIPSEL) || defined(_MIPSEL) || \
-defined(BIT_ZERO_ON_RIGHT) || defined(__alpha__) || defined(__alpha) || \
-(defined(__Lynx__) && defined(__x86__))
-#define BYTE_ORDER	LITTLE_ENDIAN
-#endif
+#define	__BIND		19950621	/*%< (DEAD) interface version stamp. */
 
-#if defined(sel) || defined(pyr) || defined(mc68000) || defined(sparc) || \
-defined(is68k) || defined(tahoe) || defined(ibm032) || defined(ibm370) || \
-defined(MIPSEB) || defined(_MIPSEB) || defined(_IBMR2) || defined(DGUX) ||\
-defined(apollo) || defined(__convex__) || defined(_CRAY) || \
-defined(__hppa) || defined(__hp9000) || \
-defined(__hp9000s300) || defined(__hp9000s700) || \
-defined(__hp3000s900) || defined(__hpux) || defined(MPE) || \
-defined (BIT_ZERO_ON_LEFT) || defined(m68k) || defined(__sparc) ||  \
-(defined(__Lynx__) && \
- (defined(__68k__) || defined(__sparc__) || defined(__powerpc__)))
-#define BYTE_ORDER	BIG_ENDIAN
-#endif
-#endif /* __linux */
-#endif /* BSD */
-#endif /* BYTE_ORDER */
-
-#if !defined(BYTE_ORDER) || \
-(BYTE_ORDER != BIG_ENDIAN && BYTE_ORDER != LITTLE_ENDIAN && \
-BYTE_ORDER != PDP_ENDIAN)
+#if !defined(_BYTE_ORDER) || \
+(_BYTE_ORDER != _BIG_ENDIAN && _BYTE_ORDER != _LITTLE_ENDIAN && \
+_BYTE_ORDER != _PDP_ENDIAN)
 	/* you must determine what the correct bit order is for
 	 * your compiler - the next line is an intentional error
 	 * which will force your compiles to bomb until you fix
 	 * the above macros.
 	 */
-#error "Undefined or invalid BYTE_ORDER"
+#error "Undefined or invalid _BYTE_ORDER"
 #endif
 
 /*%
@@ -94,7 +60,7 @@
 
 typedef struct {
 	unsigned	id :16;		/*%< query identification number */
-#if BYTE_ORDER == BIG_ENDIAN
+#if _BYTE_ORDER == _BIG_ENDIAN
 			/* fields in third byte */
 	unsigned	qr: 1;		/*%< response flag */
 	unsigned	opcode: 4;	/*%< purpose of message */
@@ -108,7 +74,7 @@ typedef struct {
 	unsigned	cd: 1;		/*%< checking disabled by resolver */
 	unsigned	rcode :4;	/*%< response code */
 #endif
-#if BYTE_ORDER == LITTLE_ENDIAN || BYTE_ORDER == PDP_ENDIAN
+#if _BYTE_ORDER == _LITTLE_ENDIAN || _BYTE_ORDER == _PDP_ENDIAN
 			/* fields in third byte */
 	unsigned	rd :1;		/*%< recursion desired */
 	unsigned	tc :1;		/*%< truncated message */



CVS commit: src/include

2022-01-05 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Thu Jan  6 00:16:47 UTC 2022

Modified Files:
src/include: err.h

Log Message:
err.h: dead once is dead enough

Per joerg's advice keep the __dead in front position as it is where
_Noreturn would go.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/include/err.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/err.h
diff -u src/include/err.h:1.17 src/include/err.h:1.18
--- src/include/err.h:1.17	Thu Jan 16 17:22:06 2014
+++ src/include/err.h	Thu Jan  6 00:16:47 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: err.h,v 1.17 2014/01/16 17:22:06 christos Exp $	*/
+/*	$NetBSD: err.h,v 1.18 2022/01/06 00:16:47 uwe Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -39,17 +39,17 @@
 
 __BEGIN_DECLS
 __dead void	err(int, const char *, ...)
-		 __printflike(2, 3) __dead;
+		 __printflike(2, 3);
 __dead void	verr(int, const char *, va_list)
-		__printflike(2, 0) __dead;
+		__printflike(2, 0);
 __dead void	errx(int, const char *, ...)
-		 __printflike(2, 3) __dead;
+		 __printflike(2, 3);
 __dead void	verrx(int, const char *, va_list)
-		__printflike(2, 0) __dead;
+		__printflike(2, 0);
 __dead void	errc(int, int, const char *, ...)
-		 __printflike(3, 4) __dead;
+		 __printflike(3, 4);
 __dead void	verrc(int, int, const char *, va_list)
-		__printflike(3, 0) __dead;
+		__printflike(3, 0);
 void		warn(const char *, ...)
 		__printflike(1, 2);
 void		vwarn(const char *, va_list)



CVS commit: src/include

2022-01-05 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Thu Jan  6 00:16:47 UTC 2022

Modified Files:
src/include: err.h

Log Message:
err.h: dead once is dead enough

Per joerg's advice keep the __dead in front position as it is where
_Noreturn would go.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/include/err.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2021-12-30 Thread Niclas Rosenvik
Module Name:src
Committed By:   nros
Date:   Thu Dec 30 16:20:19 UTC 2021

Modified Files:
src/include: dirent.h

Log Message:
Make fdopendir visible according to POSIX.1 spec.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/include/dirent.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/dirent.h
diff -u src/include/dirent.h:1.36 src/include/dirent.h:1.37
--- src/include/dirent.h:1.36	Fri Dec 16 04:45:04 2016
+++ src/include/dirent.h	Thu Dec 30 16:20:19 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: dirent.h,v 1.36 2016/12/16 04:45:04 mrg Exp $	*/
+/*	$NetBSD: dirent.h,v 1.37 2021/12/30 16:20:19 nros Exp $	*/
 
 /*-
  * Copyright (c) 1989, 1993
@@ -104,9 +104,14 @@ int readdir_r(DIR * __restrict, struct d
 void seekdir(DIR *, long);
 long telldir(DIR *);
 #endif /* defined(_NETBSD_SOURCE) || defined(_XOPEN_SOURCE) */
-#if defined(_NETBSD_SOURCE)
+#if (_POSIX_C_SOURCE - 0) >= 200809L || (_XOPEN_SOURCE - 0) >= 700 || \
+defined(_NETBSD_SOURCE)
 #ifndef __LIBC12_SOURCE__
 DIR *fdopendir(int);
+#endif
+#endif
+#if defined(_NETBSD_SOURCE)
+#ifndef __LIBC12_SOURCE__
 DIR *__opendir2(const char *, int) __RENAME(__opendir230);
 int scandir(const char *, struct dirent ***,
 int (*)(const struct dirent *), int (*)(const struct dirent **,



CVS commit: src/include

2021-12-30 Thread Niclas Rosenvik
Module Name:src
Committed By:   nros
Date:   Thu Dec 30 16:20:19 UTC 2021

Modified Files:
src/include: dirent.h

Log Message:
Make fdopendir visible according to POSIX.1 spec.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/include/dirent.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2021-09-11 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep 11 20:05:34 UTC 2021

Modified Files:
src/include: stdio.h

Log Message:
stdio.h: remove outdated comment for vscanf

When these functions where added to stdio.h 1.72 on 2008-08-04, the
conditional included _NETBSD_SOURCE.

The additional condition was removed in stdio.h 1.99 from 2020-03-20,
but the comment was not updated.


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/include/stdio.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/stdio.h
diff -u src/include/stdio.h:1.103 src/include/stdio.h:1.104
--- src/include/stdio.h:1.103	Sat Sep 11 19:05:06 2021
+++ src/include/stdio.h	Sat Sep 11 20:05:33 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: stdio.h,v 1.103 2021/09/11 19:05:06 rillig Exp $	*/
+/*	$NetBSD: stdio.h,v 1.104 2021/09/11 20:05:33 rillig Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -383,8 +383,7 @@ __END_DECLS
 #endif /* (_POSIX_C_SOURCE - 0) >= 200112L || _XOPEN_SOURCE >= 500 || ... */
 
 /*
- * Functions defined in ISO C99.  Still put under _NETBSD_SOURCE due to
- * backward compatible.
+ * Functions defined in ISO C99.
  */
 #if defined(__STDIO_C99_FEATURES)
 __BEGIN_DECLS



CVS commit: src/include

2021-09-11 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep 11 20:05:34 UTC 2021

Modified Files:
src/include: stdio.h

Log Message:
stdio.h: remove outdated comment for vscanf

When these functions where added to stdio.h 1.72 on 2008-08-04, the
conditional included _NETBSD_SOURCE.

The additional condition was removed in stdio.h 1.99 from 2020-03-20,
but the comment was not updated.


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/include/stdio.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2021-09-11 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep 11 19:05:06 UTC 2021

Modified Files:
src/include: stdio.h

Log Message:
stdio.h: sync comment for struct __sFILE with reality

In stdio.h 1.1 from 1993-03-21, the struct had a member named _ub for
the ungetc buffer.  That member was repurposed in stdio.h 1.42 from
2001-12-07 in order to support wide characters.

Remove the reference to the 'WARNING above' since there is no such
warning and even when this comment was added in stdio.h 1.20 from
1998-02-02, there was none.


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/include/stdio.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/stdio.h
diff -u src/include/stdio.h:1.102 src/include/stdio.h:1.103
--- src/include/stdio.h:1.102	Sat Sep 11 18:38:25 2021
+++ src/include/stdio.h	Sat Sep 11 19:05:06 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: stdio.h,v 1.102 2021/09/11 18:38:25 rillig Exp $	*/
+/*	$NetBSD: stdio.h,v 1.103 2021/09/11 19:05:06 rillig Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -103,13 +103,12 @@ struct __sbuf {
  * _lbfsize is used only to make the inline line-buffered output stream
  * code as compact as possible.
  *
- * _ub, _up, and _ur are used when ungetc() pushes back more characters
- * than fit in the current _bf, or when ungetc() pushes back a character
- * that does not match the previous one in _bf.  When this happens,
- * _ub._base becomes non-nil (i.e., a stream has ungetc() data iff
- * _ub._base!=NULL) and _up and _ur save the current values of _p and _r.
- *
- * NB: see WARNING above before changing the layout of this structure!
+ * _ub (via _ext and struct __sfileext), _up, and _ur are used when ungetc()
+ * pushes back more characters than fit in the current _bf, or when ungetc()
+ * pushes back a character that does not match the previous one in _bf.
+ * When this happens, _ext._base becomes non-nil (i.e., a stream has ungetc()
+ * data iff _ub._base != NULL) and _up and _ur save the current values of _p
+ * and _r.
  */
 typedef	struct __sFILE {
 	unsigned char *_p;	/* current position in (some) buffer */



CVS commit: src/include

2021-09-11 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep 11 19:05:06 UTC 2021

Modified Files:
src/include: stdio.h

Log Message:
stdio.h: sync comment for struct __sFILE with reality

In stdio.h 1.1 from 1993-03-21, the struct had a member named _ub for
the ungetc buffer.  That member was repurposed in stdio.h 1.42 from
2001-12-07 in order to support wide characters.

Remove the reference to the 'WARNING above' since there is no such
warning and even when this comment was added in stdio.h 1.20 from
1998-02-02, there was none.


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/include/stdio.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2021-09-11 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep 11 18:38:25 UTC 2021

Modified Files:
src/include: stdio.h

Log Message:
stdio.h: remove outdated comment about fpos_t

The 'fairly grotesque' from 1994-04-03 referred to the conditional
definition of the type fpos_t, using two different integer types that
both happened to be 64-bit.

When stdio was changed on 2012-01-22 to keep track of the mbstate, the
conditional type definition was removed and the comment no longer made
sense.


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/include/stdio.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/stdio.h
diff -u src/include/stdio.h:1.101 src/include/stdio.h:1.102
--- src/include/stdio.h:1.101	Sat Sep 11 16:58:38 2021
+++ src/include/stdio.h	Sat Sep 11 18:38:25 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: stdio.h,v 1.101 2021/09/11 16:58:38 rillig Exp $	*/
+/*	$NetBSD: stdio.h,v 1.102 2021/09/11 18:38:25 rillig Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -66,11 +66,6 @@ typedef __va_list va_list;
 
 #include 
 
-/*  
- * This is fairly grotesque, but pure ANSI code must not inspect the
- * innards of an fpos_t anyway.  The library internally uses off_t,
- * which we assume is exactly as big as eight chars.
- */
 typedef struct __sfpos {
 	__off_t _pos;
 	__mbstate_t _mbstate_in, _mbstate_out;



CVS commit: src/include

2021-09-11 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep 11 18:38:25 UTC 2021

Modified Files:
src/include: stdio.h

Log Message:
stdio.h: remove outdated comment about fpos_t

The 'fairly grotesque' from 1994-04-03 referred to the conditional
definition of the type fpos_t, using two different integer types that
both happened to be 64-bit.

When stdio was changed on 2012-01-22 to keep track of the mbstate, the
conditional type definition was removed and the comment no longer made
sense.


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/include/stdio.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2021-09-11 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep 11 16:58:39 UTC 2021

Modified Files:
src/include: stdio.h

Log Message:
stdio.h: fix typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.101 src/include/stdio.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/stdio.h
diff -u src/include/stdio.h:1.100 src/include/stdio.h:1.101
--- src/include/stdio.h:1.100	Sat Sep 11 08:34:24 2021
+++ src/include/stdio.h	Sat Sep 11 16:58:38 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: stdio.h,v 1.100 2021/09/11 08:34:24 rillig Exp $	*/
+/*	$NetBSD: stdio.h,v 1.101 2021/09/11 16:58:38 rillig Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -344,7 +344,7 @@ __END_DECLS
 #endif
 
 /*
- * Functions defined in ISO XPG4.2, ISO C99, POSIX 1003.1-2001 or later.
+ * Functions defined in XPG4.2, ISO C99, POSIX 1003.1-2001 or later.
  */
 #if defined(__STDIO_C99_FEATURES) || (_POSIX_C_SOURCE - 0) >= 200112L || \
 (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \



CVS commit: src/include

2021-09-11 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep 11 16:58:39 UTC 2021

Modified Files:
src/include: stdio.h

Log Message:
stdio.h: fix typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.101 src/include/stdio.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2021-09-11 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep 11 08:34:25 UTC 2021

Modified Files:
src/include: stdio.h

Log Message:
stdio.h: fix typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 src/include/stdio.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/stdio.h
diff -u src/include/stdio.h:1.99 src/include/stdio.h:1.100
--- src/include/stdio.h:1.99	Fri Mar 20 01:08:42 2020
+++ src/include/stdio.h	Sat Sep 11 08:34:24 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: stdio.h,v 1.99 2020/03/20 01:08:42 joerg Exp $	*/
+/*	$NetBSD: stdio.h,v 1.100 2021/09/11 08:34:24 rillig Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -325,7 +325,7 @@ int	getchar_unlocked(void);
 int	putc_unlocked(int, FILE *);
 int	putchar_unlocked(int);
 __END_DECLS
-#endif /* C99 || _POSIX_C_SOURCE >= 1995056 || _XOPEN_SOURCE >= 500 || ... */
+#endif /* C99 || _POSIX_C_SOURCE >= 199506 || _XOPEN_SOURCE >= 500 || ... */
 
 /*
  * Functions defined in POSIX 1003.2 and XPG2 or later.



CVS commit: src/include

2021-09-11 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Sep 11 08:34:25 UTC 2021

Modified Files:
src/include: stdio.h

Log Message:
stdio.h: fix typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 src/include/stdio.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2021-08-14 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Sun Aug 15 00:36:11 UTC 2021

Modified Files:
src/include: utmpx.h

Log Message:
utmpx.h: fix comment missed in r. 1.10 _NETBSD_SOURCE changes


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/include/utmpx.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/utmpx.h
diff -u src/include/utmpx.h:1.17 src/include/utmpx.h:1.18
--- src/include/utmpx.h:1.17	Sun Jan 11 19:09:29 2009
+++ src/include/utmpx.h	Sun Aug 15 00:36:11 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: utmpx.h,v 1.17 2009/01/11 19:09:29 christos Exp $	 */
+/*	$NetBSD: utmpx.h,v 1.18 2021/08/15 00:36:11 gutteridge Exp $	 */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -124,7 +124,7 @@ struct lastlogx {
 	char ll_host[_UTX_HOSTSIZE];	/* host name */
 	struct sockaddr_storage ll_ss;	/* address where entry was made from */
 };
-#endif	/* !_XOPEN_SOURCE */
+#endif	/* _NETBSD_SOURCE */
 
 __BEGIN_DECLS
 



CVS commit: src/include

2021-08-14 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Sun Aug 15 00:36:11 UTC 2021

Modified Files:
src/include: utmpx.h

Log Message:
utmpx.h: fix comment missed in r. 1.10 _NETBSD_SOURCE changes


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/include/utmpx.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2021-07-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jul  3 14:07:13 UTC 2021

Modified Files:
src/include: stdlib.h

Log Message:
PR/56250: Michael Forney: mkstemp/mkdtemp not declared with
_POSIX_C_SOURCE=200809L


To generate a diff of this commit:
cvs rdiff -u -r1.122 -r1.123 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.122 src/include/stdlib.h:1.123
--- src/include/stdlib.h:1.122	Tue May 26 17:49:29 2020
+++ src/include/stdlib.h	Sat Jul  3 10:07:13 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: stdlib.h,v 1.122 2020/05/26 21:49:29 joerg Exp $	*/
+/*	$NetBSD: stdlib.h,v 1.123 2021/07/03 14:07:13 christos Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -190,8 +190,6 @@ int	 mkostemp(char *, int);
 int	 mkostemps(char *, int, int);
 #endif
 
-char	*mkdtemp(char *);
-int	 mkstemp(char *);
 char	*mktemp(char *)
 #ifdef __MKTEMP_OK__
 	__RENAME(_mktemp)
@@ -206,8 +204,6 @@ int	 ttyslot(void);
 
 void	*valloc(size_t);		/* obsoleted by malloc() */
 
-int	 getsubopt(char **, char * const *, char **);
-
 int	 grantpt(int);
 int	 unlockpt(int);
 char	*ptsname(int);
@@ -256,6 +252,20 @@ int	 posix_memalign(void **, size_t, siz
 #endif
 
 /*
+ * The Open Group Base Specifications, Issue 7; IEEE Std 1003.1-2008 (POSIX)
+ *   or
+ * X/Open Portability Guide >= Issue 4 Version 2
+ */
+#if (_POSIX_C_SOURCE - 0) >= 200809L || \
+(defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
+(_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)
+char	*mkdtemp(char *);
+int	 mkstemp(char *);
+
+int	 getsubopt(char **, char * const *, char **);
+#endif
+
+/*
  * Implementation-defined extensions
  */
 #if defined(_NETBSD_SOURCE)



CVS commit: src/include

2021-07-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jul  3 14:07:13 UTC 2021

Modified Files:
src/include: stdlib.h

Log Message:
PR/56250: Michael Forney: mkstemp/mkdtemp not declared with
_POSIX_C_SOURCE=200809L


To generate a diff of this commit:
cvs rdiff -u -r1.122 -r1.123 src/include/stdlib.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/include

2021-04-30 Thread Christos Zoulas
Hmm, it seems that we were the only ones that had RES_NOCHECKNAME enabled.
Everyone else uses check-names by default. So I am inclined to leave it as is.

christos

> On Apr 30, 2021, at 5:33 PM, Christos Zoulas  wrote:
> 
> Signed PGP part
> I guess I will undo it, because as I mentioned in a separate mail it causes 
> other problems.
> 
> christos
> 
>> On Apr 30, 2021, at 5:18 PM, Robert Elz  wrote:
>> 
>>   Date:Fri, 30 Apr 2021 12:07:49 -0400
>>   From:"Christos Zoulas" 
>>   Message-ID:  <20210430160749.3a4dbf...@cvs.netbsd.org>
>> 
>> |src/include: resolv.h
>> |
>> | Log Message:
>> | Default to check-names for safety.
>> 
>> Please don't do that, check-names applies at the wrong place, and
>> is far too big a hammer.   Applications which actually depend upon
>> names returned (all that ever matters) having (or not having) some
>> particular syntax should be verifying that before using it, just like
>> any other data received over the network.   What is to be valid, and
>> what is a problem, varies from application to application.
>> 
>> kre
> 
> 
> 



signature.asc
Description: Message signed with OpenPGP


Re: CVS commit: src/include

2021-04-30 Thread Christos Zoulas
I guess I will undo it, because as I mentioned in a separate mail it causes 
other problems.

christos

> On Apr 30, 2021, at 5:18 PM, Robert Elz  wrote:
> 
>Date:Fri, 30 Apr 2021 12:07:49 -0400
>From:"Christos Zoulas" 
>Message-ID:  <20210430160749.3a4dbf...@cvs.netbsd.org>
> 
>  |src/include: resolv.h
>  |
>  | Log Message:
>  | Default to check-names for safety.
> 
> Please don't do that, check-names applies at the wrong place, and
> is far too big a hammer.   Applications which actually depend upon
> names returned (all that ever matters) having (or not having) some
> particular syntax should be verifying that before using it, just like
> any other data received over the network.   What is to be valid, and
> what is a problem, varies from application to application.
> 
> kre



signature.asc
Description: Message signed with OpenPGP


Re: CVS commit: src/include

2021-04-30 Thread Robert Elz
Date:Fri, 30 Apr 2021 12:07:49 -0400
From:"Christos Zoulas" 
Message-ID:  <20210430160749.3a4dbf...@cvs.netbsd.org>

  | src/include: resolv.h
  |
  | Log Message:
  | Default to check-names for safety.

Please don't do that, check-names applies at the wrong place, and
is far too big a hammer.   Applications which actually depend upon
names returned (all that ever matters) having (or not having) some
particular syntax should be verifying that before using it, just like
any other data received over the network.   What is to be valid, and
what is a problem, varies from application to application.

kre



CVS commit: src/include

2021-04-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr 30 16:07:49 UTC 2021

Modified Files:
src/include: resolv.h

Log Message:
Default to check-names for safety.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/include/resolv.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/resolv.h
diff -u src/include/resolv.h:1.40 src/include/resolv.h:1.41
--- src/include/resolv.h:1.40	Wed Nov  7 10:45:24 2012
+++ src/include/resolv.h	Fri Apr 30 12:07:49 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: resolv.h,v 1.40 2012/11/07 15:45:24 christos Exp $	*/
+/*	$NetBSD: resolv.h,v 1.41 2021/04/30 16:07:49 christos Exp $	*/
 
 /*
  * Portions Copyright (C) 2004, 2005, 2008, 2009  Internet Systems Consortium, Inc. ("ISC")
@@ -257,7 +257,7 @@ union res_sockaddr_union {
 #define RES_NO_NIBBLE2	0x8000	/*%< disable alternate nibble lookup */
 
 #define RES_DEFAULT	(RES_RECURSE | RES_DEFNAMES | \
-			 RES_DNSRCH | RES_NO_NIBBLE2 | RES_NOCHECKNAME)
+			 RES_DNSRCH | RES_NO_NIBBLE2)
 
 /*%
  * Resolver "pfcode" values.  Used by dig.



CVS commit: src/include

2021-04-30 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr 30 16:07:49 UTC 2021

Modified Files:
src/include: resolv.h

Log Message:
Default to check-names for safety.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/include/resolv.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2021-02-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb 23 17:14:42 UTC 2021

Modified Files:
src/include: regex.h

Log Message:
- Replace REG_ENOSYS (unused) with REG_ILLSEQ.
- Add REG_GNU


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/include/regex.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/regex.h
diff -u src/include/regex.h:1.15 src/include/regex.h:1.16
--- src/include/regex.h:1.15	Thu Jan 14 16:45:18 2016
+++ src/include/regex.h	Tue Feb 23 12:14:42 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: regex.h,v 1.15 2016/01/14 21:45:18 christos Exp $	*/
+/*	$NetBSD: regex.h,v 1.16 2021/02/23 17:14:42 christos Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -101,6 +101,7 @@ typedef struct {
 #define	REG_NOSPEC	0020
 #define	REG_PEND	0040
 #define	REG_DUMP	0200
+#define	REG_GNU		0400
 
 /* regerror() flags */
 #define	REG_NOMATCH	 1
@@ -119,7 +120,7 @@ typedef struct {
 #define	REG_EMPTY	14
 #define	REG_ASSERT	15
 #define	REG_INVARG	16
-#define	REG_ENOSYS	17
+#define	REG_ILLSEQ  17
 #define	REG_ATOI	255	/* convert name to number (!) */
 #define	REG_ITOA	0400	/* convert number to name (!) */
 



CVS commit: src/include

2021-02-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Feb 23 17:14:42 UTC 2021

Modified Files:
src/include: regex.h

Log Message:
- Replace REG_ENOSYS (unused) with REG_ILLSEQ.
- Add REG_GNU


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/include/regex.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2020-12-04 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Fri Dec  4 23:04:58 UTC 2020

Modified Files:
src/include: unistd.h

Log Message:
Correct typo in previous.


To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.161 src/include/unistd.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/unistd.h
diff -u src/include/unistd.h:1.160 src/include/unistd.h:1.161
--- src/include/unistd.h:1.160	Fri Dec  4 20:39:10 2020
+++ src/include/unistd.h	Fri Dec  4 23:04:58 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: unistd.h,v 1.160 2020/12/04 20:39:10 christos Exp $	*/
+/*	$NetBSD: unistd.h,v 1.161 2020/12/04 23:04:58 kre Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2008 The NetBSD Foundation, Inc.
@@ -102,7 +102,7 @@ char	*cuserid(char *);	/* obsolete */
 #endif /* __CUSERID_DECLARED */
 int	 dup(int);
 int	 dup2(int, int);
-int	 execl(const char *, const char *, ...) __null__sentinel;
+int	 execl(const char *, const char *, ...) __null_sentinel;
 int	 execle(const char *, const char *, ...);
 int	 execlp(const char *, const char *, ...) __null_sentinel;
 int	 execv(const char *, char * const *);



CVS commit: src/include

2020-12-04 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Fri Dec  4 23:04:58 UTC 2020

Modified Files:
src/include: unistd.h

Log Message:
Correct typo in previous.


To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.161 src/include/unistd.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2020-12-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec  4 20:39:10 UTC 2020

Modified Files:
src/include: unistd.h

Log Message:
Add __null_sentinel


To generate a diff of this commit:
cvs rdiff -u -r1.159 -r1.160 src/include/unistd.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/unistd.h
diff -u src/include/unistd.h:1.159 src/include/unistd.h:1.160
--- src/include/unistd.h:1.159	Tue Sep 22 17:37:47 2020
+++ src/include/unistd.h	Fri Dec  4 15:39:10 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: unistd.h,v 1.159 2020/09/22 21:37:47 nia Exp $	*/
+/*	$NetBSD: unistd.h,v 1.160 2020/12/04 20:39:10 christos Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2008 The NetBSD Foundation, Inc.
@@ -102,9 +102,9 @@ char	*cuserid(char *);	/* obsolete */
 #endif /* __CUSERID_DECLARED */
 int	 dup(int);
 int	 dup2(int, int);
-int	 execl(const char *, const char *, ...);
+int	 execl(const char *, const char *, ...) __null__sentinel;
 int	 execle(const char *, const char *, ...);
-int	 execlp(const char *, const char *, ...);
+int	 execlp(const char *, const char *, ...) __null_sentinel;
 int	 execv(const char *, char * const *);
 int	 execve(const char *, char * const *, char * const *);
 int	 execvp(const char *, char * const *);



CVS commit: src/include

2020-12-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Dec  4 20:39:10 UTC 2020

Modified Files:
src/include: unistd.h

Log Message:
Add __null_sentinel


To generate a diff of this commit:
cvs rdiff -u -r1.159 -r1.160 src/include/unistd.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include/arpa

2020-10-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 10 19:51:48 UTC 2020

Modified Files:
src/include/arpa: nameser.h

Log Message:
- remove bitypes.h fossil
- define u_{char,short,int,long} if we don't have _NETBSD_SOURCE defined
  so that this compiles (and resolv.h since it includes this). This is
  the simplest solution. Others:
  - always define them (bad, pollutes namespace)
  - create  (bad, overkill)
  - change them to unsigned {char, short, int long} (bad, too disruptive)


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/include/arpa/nameser.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/arpa/nameser.h
diff -u src/include/arpa/nameser.h:1.25 src/include/arpa/nameser.h:1.26
--- src/include/arpa/nameser.h:1.25	Sun Apr 12 13:07:34 2009
+++ src/include/arpa/nameser.h	Sat Oct 10 15:51:48 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: nameser.h,v 1.25 2009/04/12 17:07:34 christos Exp $	*/
+/*	$NetBSD: nameser.h,v 1.26 2020/10/10 19:51:48 christos Exp $	*/
 
 /*
  * Portions Copyright (C) 2004, 2005, 2008, 2009  Internet Systems Consortium, Inc. ("ISC")
@@ -56,13 +56,16 @@
 #define BIND_4_COMPAT
 
 #include 
-#if (!defined(BSD)) || (BSD < 199306)
-# include 
-#else
-# include 
-#endif
+#include 
 #include 
 
+#if !defined(_NETBSD_SOURCE)
+typedef	unsigned char	u_char;
+typedef	unsigned short	u_short;
+typedef	unsigned int	u_int;
+typedef	unsigned long	u_long;
+#endif
+
 /*%
  * Revision information.  This is the release date in MMDD format.
  * It can change every day so the right thing to do with it is use it



CVS commit: src/include/arpa

2020-10-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct 10 19:51:48 UTC 2020

Modified Files:
src/include/arpa: nameser.h

Log Message:
- remove bitypes.h fossil
- define u_{char,short,int,long} if we don't have _NETBSD_SOURCE defined
  so that this compiles (and resolv.h since it includes this). This is
  the simplest solution. Others:
  - always define them (bad, pollutes namespace)
  - create  (bad, overkill)
  - change them to unsigned {char, short, int long} (bad, too disruptive)


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/include/arpa/nameser.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include/rpc

2020-10-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct  3 18:30:39 UTC 2020

Modified Files:
src/include/rpc: auth.h

Log Message:
add set_rpc_maxgrouplist(3)


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/include/rpc/auth.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/rpc/auth.h
diff -u src/include/rpc/auth.h:1.19 src/include/rpc/auth.h:1.20
--- src/include/rpc/auth.h:1.19	Fri Jan 22 21:34:09 2016
+++ src/include/rpc/auth.h	Sat Oct  3 14:30:39 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: auth.h,v 1.19 2016/01/23 02:34:09 dholland Exp $	*/
+/*	$NetBSD: auth.h,v 1.20 2020/10/03 18:30:39 christos Exp $	*/
 
 /*
  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
@@ -172,6 +172,7 @@ extern AUTH *authnone_create		(void);
 extern AUTH *authdes_create		(char *, unsigned int,
 	struct sockaddr_in *, des_block *);
 extern bool_t xdr_opaque_auth		(XDR *, struct opaque_auth *);
+extern void set_rpc_maxgrouplist	(int);
 
 #define authsys_create(c,i1,i2,i3,ip) authunix_create((c),(i1),(i2),(i3),(ip))
 #define authsys_create_default() authunix_create_default()



CVS commit: src/include/rpc

2020-10-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Oct  3 18:30:39 UTC 2020

Modified Files:
src/include/rpc: auth.h

Log Message:
add set_rpc_maxgrouplist(3)


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/include/rpc/auth.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2020-09-21 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Sep 22 01:52:16 UTC 2020

Modified Files:
src/include: link_elf.h

Log Message:
Remove duplicate word in a comment


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/include/link_elf.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/link_elf.h
diff -u src/include/link_elf.h:1.12 src/include/link_elf.h:1.13
--- src/include/link_elf.h:1.12	Mon Sep 21 16:08:57 2020
+++ src/include/link_elf.h	Tue Sep 22 01:52:16 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: link_elf.h,v 1.12 2020/09/21 16:08:57 kamil Exp $	*/
+/*	$NetBSD: link_elf.h,v 1.13 2020/09/22 01:52:16 kamil Exp $	*/
 
 #ifndef _LINK_ELF_H_
 #define	_LINK_ELF_H_
@@ -15,7 +15,7 @@ typedef struct link_map {
 #endif
 	const char	*l_name;	/* Absolute Path to Library */
 	void		*l_ld;		/* Pointer to .dynamic in memory */
-	struct link_map	*l_next;	/* linked list of of mapped libs */
+	struct link_map	*l_next;	/* linked list of mapped libs */
 	struct link_map *l_prev;
 } Link_map;
 



CVS commit: src/include

2020-09-21 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Sep 22 01:52:16 UTC 2020

Modified Files:
src/include: link_elf.h

Log Message:
Remove duplicate word in a comment


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/include/link_elf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2020-09-20 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Mon Sep 21 02:20:27 UTC 2020

Modified Files:
src/include: link_elf.h

Log Message:
Refine the documentation of r_debug

Obtained from OpenBSD link.h r.1.15.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/include/link_elf.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/link_elf.h
diff -u src/include/link_elf.h:1.10 src/include/link_elf.h:1.11
--- src/include/link_elf.h:1.10	Sat Oct 16 10:27:06 2010
+++ src/include/link_elf.h	Mon Sep 21 02:20:27 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: link_elf.h,v 1.10 2010/10/16 10:27:06 skrll Exp $	*/
+/*	$NetBSD: link_elf.h,v 1.11 2020/09/21 02:20:27 kamil Exp $	*/
 
 #ifndef _LINK_ELF_H_
 #define	_LINK_ELF_H_
@@ -18,13 +18,27 @@ typedef struct link_map {
 } Link_map;
 
 /*
- * This only exists for GDB.
+ * Debug rendezvous struct. Pointer to this is set up in the
+ * target code pointed by the DT_DEBUG tag. If it is
+ * defined.
  */
 struct r_debug {
-	int r_version;			/* not used */
+	int r_version;			/* protocol version */
 	struct link_map *r_map;		/* list of loaded images */
+
+	/*
+	 * This is the address of a function internal to the run-time linker,
+	 * that will always be called when the linker begins to map in a
+	 * library or unmap it, and again when the mapping change is complete.
+	 * The debugger can set a breakpoint at this address if it wants to
+	 * notice shared object mapping changes.
+	 */
 	void (*r_brk)(void);		/* pointer to break point */
 	enum {
+		/*
+		 * This state value describes the mapping change taking place
+		 * when the `r_brk' address is called.
+		 */
 		RT_CONSISTENT,		/* things are stable */
 		RT_ADD,			/* adding a shared library */
 		RT_DELETE		/* removing a shared library */



CVS commit: src/include

2020-09-20 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Mon Sep 21 02:20:27 UTC 2020

Modified Files:
src/include: link_elf.h

Log Message:
Refine the documentation of r_debug

Obtained from OpenBSD link.h r.1.15.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/include/link_elf.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include/arpa

2020-06-27 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Sun Jun 28 02:16:19 UTC 2020

Modified Files:
src/include/arpa: nameser_compat.h

Log Message:
nameser_compat.h: correct preprocessor error syntax


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/include/arpa/nameser_compat.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/arpa/nameser_compat.h
diff -u src/include/arpa/nameser_compat.h:1.6 src/include/arpa/nameser_compat.h:1.7
--- src/include/arpa/nameser_compat.h:1.6	Tue Feb 24 17:57:08 2015
+++ src/include/arpa/nameser_compat.h	Sun Jun 28 02:16:19 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: nameser_compat.h,v 1.6 2015/02/24 17:57:08 christos Exp $	*/
+/*	$NetBSD: nameser_compat.h,v 1.7 2020/06/28 02:16:19 gutteridge Exp $	*/
 
 /* Copyright (c) 1983, 1989
  *The Regents of the University of California.  All rights reserved.
@@ -82,7 +82,7 @@
 	 * which will force your compiles to bomb until you fix
 	 * the above macros.
 	 */
-  error "Undefined or invalid BYTE_ORDER";
+#error "Undefined or invalid BYTE_ORDER"
 #endif
 
 /*%



CVS commit: src/include/arpa

2020-06-27 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Sun Jun 28 02:16:19 UTC 2020

Modified Files:
src/include/arpa: nameser_compat.h

Log Message:
nameser_compat.h: correct preprocessor error syntax


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/include/arpa/nameser_compat.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2020-06-04 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Thu Jun  4 11:21:16 UTC 2020

Modified Files:
src/include: netdb.h

Log Message:
Remove bogus tests for 64-bit i386 and SuperH


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/include/netdb.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/netdb.h
diff -u src/include/netdb.h:1.69 src/include/netdb.h:1.70
--- src/include/netdb.h:1.69	Mon Aug 19 07:18:42 2013
+++ src/include/netdb.h	Thu Jun  4 11:21:16 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: netdb.h,v 1.69 2013/08/19 07:18:42 christos Exp $	*/
+/*	$NetBSD: netdb.h,v 1.70 2020/06/04 11:21:16 nia Exp $	*/
 
 /*
  * ++Copyright++ 1980, 1983, 1988, 1993
@@ -162,13 +162,11 @@ struct	netent {
 	char		*n_name;	/*%< official name of net */
 	char		**n_aliases;	/*%< alias list */
 	int		n_addrtype;	/*%< net address type */
-#if (defined(__sparc__) && defined(_LP64)) || \
-(defined(__sh__) && defined(_LP64) && (_BYTE_ORDER == _BIG_ENDIAN))
+#if defined(__sparc__) && defined(_LP64)
 	int		__n_pad0;	/* ABI compatibility */
 #endif
 	uint32_t	n_net;		/*%< network # */
-#if defined(__alpha__) || (defined(__i386__) && defined(_LP64)) || \
-(defined(__sh__) && defined(_LP64) && (_BYTE_ORDER == _LITTLE_ENDIAN))
+#if defined(__alpha__)
 	int		__n_pad0;	/* ABI compatibility */
 #endif
 };
@@ -208,7 +206,7 @@ struct addrinfo {
 	int		__ai_pad0;	/* ABI compatibility */
 #endif
 	socklen_t	 ai_addrlen;	/*%< length of ai_addr */
-#if defined(__alpha__) || (defined(__i386__) && defined(_LP64))
+#if defined(__alpha__)
 	int		__ai_pad0;	/* ABI compatibility */
 #endif
 	char		*ai_canonname;	/*%< canonical name for hostname */



CVS commit: src/include

2020-06-04 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Thu Jun  4 11:21:16 UTC 2020

Modified Files:
src/include: netdb.h

Log Message:
Remove bogus tests for 64-bit i386 and SuperH


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/include/netdb.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2020-05-26 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue May 26 21:49:30 UTC 2020

Modified Files:
src/include: stdlib.h

Log Message:
Avoid depending on namespace pollution in stdlib.h.


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 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.121 src/include/stdlib.h:1.122
--- src/include/stdlib.h:1.121	Sat Jan  5 09:16:46 2019
+++ src/include/stdlib.h	Tue May 26 21:49:29 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: stdlib.h,v 1.121 2019/01/05 09:16:46 maya Exp $	*/
+/*	$NetBSD: stdlib.h,v 1.122 2020/05/26 21:49:29 joerg Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -272,7 +272,7 @@ uint32_t arc4random(void);
 void	 arc4random_stir(void);
 void	 arc4random_buf(void *, size_t);
 uint32_t arc4random_uniform(uint32_t);
-void	 arc4random_addrandom(u_char *, int);
+void	 arc4random_addrandom(unsigned char *, int);
 char	*getbsize(int *, long *);
 char	*cgetcap(char *, const char *, int);
 int	 cgetclose(void);



CVS commit: src/include

2020-05-26 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue May 26 21:49:30 UTC 2020

Modified Files:
src/include: stdlib.h

Log Message:
Avoid depending on namespace pollution in stdlib.h.


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/include/stdlib.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2020-05-13 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed May 13 14:00:58 UTC 2020

Modified Files:
src/include: stddef.h

Log Message:
Remove trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/include/stddef.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2020-05-13 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed May 13 14:00:58 UTC 2020

Modified Files:
src/include: stddef.h

Log Message:
Remove trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/include/stddef.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/stddef.h
diff -u src/include/stddef.h:1.23 src/include/stddef.h:1.24
--- src/include/stddef.h:1.23	Sun Mar  1 22:08:17 2020
+++ src/include/stddef.h	Wed May 13 14:00:58 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: stddef.h,v 1.23 2020/03/01 22:08:17 kamil Exp $	*/
+/*	$NetBSD: stddef.h,v 1.24 2020/05/13 14:00:58 joerg Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -65,7 +65,7 @@ typedef	_BSD_WCHAR_T_	wchar_t;
 #endif
 #define	offsetof(type, member) __offsetof__((reinterpret_cast \
 (_cast(static_cast(0)->member
-#endif  
+#endif
 
 #if (__STDC_VERSION__ - 0) >= 201112L || (__cplusplus - 0) >= 201103L
 typedef union {
@@ -74,5 +74,5 @@ typedef union {
 	long long int _ll;
 } max_align_t;
 #endif
- 
+
 #endif /* _STDDEF_H_ */



Re: CVS commit: src/include

2020-04-17 Thread Paul Goyette

On Fri, 17 Apr 2020, Kamil Rytarowski wrote:


On 17.04.2020 22:22, Joerg Sonnenberger wrote:

On Fri, Apr 17, 2020 at 03:22:35PM +, Kamil Rytarowski wrote:

Module Name:src
Committed By:   kamil
Date:   Fri Apr 17 15:22:35 UTC 2020

Modified Files:
src/include: assert.h

Log Message:
Remove the static_assert() fallback for pre-C11 and pre-C++11

C++ without real static_assert() can be incompatible with the C fallback
as presented in openjdk.

A pre-C11 compiler can be picky on the implementation.


So did you actually test that the tree compiles with this? Just asking,
since your own ptrace tests depend on static_assert...

Joerg



I will fix it!


And please test...   :)


++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/include

2020-04-17 Thread Kamil Rytarowski
On 17.04.2020 22:22, Joerg Sonnenberger wrote:
> On Fri, Apr 17, 2020 at 03:22:35PM +, Kamil Rytarowski wrote:
>> Module Name: src
>> Committed By:kamil
>> Date:Fri Apr 17 15:22:35 UTC 2020
>>
>> Modified Files:
>>  src/include: assert.h
>>
>> Log Message:
>> Remove the static_assert() fallback for pre-C11 and pre-C++11
>>
>> C++ without real static_assert() can be incompatible with the C fallback
>> as presented in openjdk.
>>
>> A pre-C11 compiler can be picky on the implementation.
> 
> So did you actually test that the tree compiles with this? Just asking,
> since your own ptrace tests depend on static_assert...
> 
> Joerg
> 

I will fix it!



signature.asc
Description: OpenPGP digital signature


Re: CVS commit: src/include

2020-04-17 Thread Paul Goyette

On Fri, 17 Apr 2020, Joerg Sonnenberger wrote:


On Fri, Apr 17, 2020 at 03:22:35PM +, Kamil Rytarowski wrote:

Module Name:src
Committed By:   kamil
Date:   Fri Apr 17 15:22:35 UTC 2020

Modified Files:
src/include: assert.h

Log Message:
Remove the static_assert() fallback for pre-C11 and pre-C++11

C++ without real static_assert() can be incompatible with the C fallback
as presented in openjdk.

A pre-C11 compiler can be picky on the implementation.


So did you actually test that the tree compiles with this? Just asking,
since your own ptrace tests depend on static_assert...


Obviousliy this change was not tested...

dependall ===> tests/lib/libc/sys
#   compile  sys/t_ptrace_wait.o
/build/netbsd-local/tools/x86_64/amd64/bin/x86_64--netbsd-gcc -O2   -std=gnu99  
  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith 
-Wno-sign-compare  -Wsystem-headers   -Wno-traditional   -Wa,--fatal-warnings  
-Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wextra 
-Wno-unused-parameter -Wno-sign-compare -Wsign-compare -Wformat=2  
-Wno-format-zero-length  -Werror -Wno-missing-noreturn -fPIE  -g   
--sysroot=/build/netbsd-local/dest/amd64 
-I/build/netbsd-local/src_ro/tests/lib/libc/sys/../../..  -c   -D_KERNTYPES 
-D__TEST_FENV -DENABLE_TESTS 
/build/netbsd-local/src_ro/tests/lib/libc/sys/t_ptrace_wait.c
/build/netbsd-local/src_ro/tests/lib/libc/sys/t_ptrace_wait.c:77:15: error: 
expected declaration specifiers or '...' before 'sizeof'
 static_assert(sizeof(((struct ptrace_state *)0)->pe_report_event) ==
   ^~
/build/netbsd-local/src_ro/tests/lib/libc/sys/t_ptrace_wait.c:79:5: error: 
expected declaration specifiers or '...' before string constant
 "pe_report_event and si_pe_report_event must be of the same size");
 ^
/build/netbsd-local/src_ro/tests/lib/libc/sys/t_ptrace_wait.c:80:15: error: 
expected declaration specifiers or '...' before 'sizeof'
 static_assert(sizeof(((struct ptrace_state *)0)->pe_other_pid) ==
   ^~
/build/netbsd-local/src_ro/tests/lib/libc/sys/t_ptrace_wait.c:82:5: error: 
expected declaration specifiers or '...' before string constant
 "pe_other_pid and si_pe_other_pid must be of the same size");
 ^~~
/build/netbsd-local/src_ro/tests/lib/libc/sys/t_ptrace_wait.c:83:15: error: 
expected declaration specifiers or '...' before 'sizeof'
 static_assert(sizeof(((struct ptrace_state *)0)->pe_lwp) ==
   ^~
/build/netbsd-local/src_ro/tests/lib/libc/sys/t_ptrace_wait.c:85:5: error: 
expected declaration specifiers or '...' before string constant
 "pe_lwp and si_pe_lwp must be of the same size");
 ^~~
/build/netbsd-local/src_ro/tests/lib/libc/sys/t_ptrace_wait.c:86:15: error: 
expected declaration specifiers or '...' before 'sizeof'
 static_assert(sizeof(((struct ptrace_state *)0)->pe_other_pid) ==
   ^~
/build/netbsd-local/src_ro/tests/lib/libc/sys/t_ptrace_wait.c:88:5: error: 
expected declaration specifiers or '...' before string constant
 "pe_other_pid and pe_lwp must be of the same size");
 ^~
*** [t_ptrace_wait.o] Error code 1
nbmake: stopped in /build/netbsd-local/src_ro



++--+---+
| Paul Goyette   | PGP Key fingerprint: | E-mail addresses: |
| (Retired)  | FA29 0E3B 35AF E8AE 6651 | p...@whooppee.com |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoye...@netbsd.org   |
++--+---+


Re: CVS commit: src/include

2020-04-17 Thread Joerg Sonnenberger
On Fri, Apr 17, 2020 at 03:22:35PM +, Kamil Rytarowski wrote:
> Module Name:  src
> Committed By: kamil
> Date: Fri Apr 17 15:22:35 UTC 2020
> 
> Modified Files:
>   src/include: assert.h
> 
> Log Message:
> Remove the static_assert() fallback for pre-C11 and pre-C++11
> 
> C++ without real static_assert() can be incompatible with the C fallback
> as presented in openjdk.
> 
> A pre-C11 compiler can be picky on the implementation.

So did you actually test that the tree compiles with this? Just asking,
since your own ptrace tests depend on static_assert...

Joerg


CVS commit: src/include

2020-04-17 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri Apr 17 15:22:35 UTC 2020

Modified Files:
src/include: assert.h

Log Message:
Remove the static_assert() fallback for pre-C11 and pre-C++11

C++ without real static_assert() can be incompatible with the C fallback
as presented in openjdk.

A pre-C11 compiler can be picky on the implementation.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/include/assert.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/assert.h
diff -u src/include/assert.h:1.24 src/include/assert.h:1.25
--- src/include/assert.h:1.24	Mon May 27 07:31:11 2019
+++ src/include/assert.h	Fri Apr 17 15:22:34 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: assert.h,v 1.24 2019/05/27 07:31:11 kamil Exp $	*/
+/*	$NetBSD: assert.h,v 1.25 2020/04/17 15:22:34 kamil Exp $	*/
 
 /*-
  * Copyright (c) 1992, 1993
@@ -105,10 +105,8 @@ void __diagassert13(const char *, int, c
 __END_DECLS
 #endif /* __ASSERT_DECLARED */
 
-#ifndef static_assert
 #if defined(_ISOC11_SOURCE) || (__STDC_VERSION__ - 0) >= 201101L
+#ifndef static_assert
 #define static_assert _Static_assert
-#elif defined(_NETBSD_SOURCE) && (__cplusplus - 0) < 201103L
-#define static_assert(x, y) __CTASSERT(x)
 #endif /* static_assert */
 #endif



CVS commit: src/include

2020-04-17 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Fri Apr 17 15:22:35 UTC 2020

Modified Files:
src/include: assert.h

Log Message:
Remove the static_assert() fallback for pre-C11 and pre-C++11

C++ without real static_assert() can be incompatible with the C fallback
as presented in openjdk.

A pre-C11 compiler can be picky on the implementation.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/include/assert.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2020-03-31 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Mar 31 16:50:31 UTC 2020

Modified Files:
src/include: unistd.h

Log Message:
Add getsid(2) to the XOPEN namespace (again)


To generate a diff of this commit:
cvs rdiff -u -r1.155 -r1.156 src/include/unistd.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2020-03-31 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Mar 31 16:50:31 UTC 2020

Modified Files:
src/include: unistd.h

Log Message:
Add getsid(2) to the XOPEN namespace (again)


To generate a diff of this commit:
cvs rdiff -u -r1.155 -r1.156 src/include/unistd.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/unistd.h
diff -u src/include/unistd.h:1.155 src/include/unistd.h:1.156
--- src/include/unistd.h:1.155	Tue Mar 31 16:49:06 2020
+++ src/include/unistd.h	Tue Mar 31 16:50:31 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: unistd.h,v 1.155 2020/03/31 16:49:06 kamil Exp $	*/
+/*	$NetBSD: unistd.h,v 1.156 2020/03/31 16:50:31 kamil Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2008 The NetBSD Foundation, Inc.
@@ -236,7 +236,8 @@ __aconst char *crypt(const char *, const
 int	 encrypt(char *, int);
 char	*getpass(const char *);
 #endif
-#if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE)
+#if defined(_XOPEN_SOURCE) || (_POSIX_C_SOURCE - 0) >= 200809L || \
+defined(_NETBSD_SOURCE)
 pid_t	 getsid(pid_t);
 #endif
 



CVS commit: src/include

2020-03-31 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Mar 31 16:49:06 UTC 2020

Modified Files:
src/include: unistd.h

Log Message:
Expose getsid(2) to POSIX >= 2008


To generate a diff of this commit:
cvs rdiff -u -r1.154 -r1.155 src/include/unistd.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/include

2020-03-31 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Mar 31 16:49:06 UTC 2020

Modified Files:
src/include: unistd.h

Log Message:
Expose getsid(2) to POSIX >= 2008


To generate a diff of this commit:
cvs rdiff -u -r1.154 -r1.155 src/include/unistd.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/unistd.h
diff -u src/include/unistd.h:1.154 src/include/unistd.h:1.155
--- src/include/unistd.h:1.154	Sun Sep 15 23:41:41 2019
+++ src/include/unistd.h	Tue Mar 31 16:49:06 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: unistd.h,v 1.154 2019/09/15 23:41:41 christos Exp $	*/
+/*	$NetBSD: unistd.h,v 1.155 2020/03/31 16:49:06 kamil Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2008 The NetBSD Foundation, Inc.
@@ -235,6 +235,8 @@ int	 nice(int);
 __aconst char *crypt(const char *, const char *);
 int	 encrypt(char *, int);
 char	*getpass(const char *);
+#endif
+#if (_POSIX_C_SOURCE - 0) >= 200809L || defined(_NETBSD_SOURCE)
 pid_t	 getsid(pid_t);
 #endif
 



CVS commit: src/include

2020-03-19 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Mar 20 01:08:43 UTC 2020

Modified Files:
src/include: ctype.h stdio.h wchar.h

Log Message:
Fix visibility of various C99 features, esp. for C++11.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/include/ctype.h
cvs rdiff -u -r1.98 -r1.99 src/include/stdio.h
cvs rdiff -u -r1.43 -r1.44 src/include/wchar.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/ctype.h
diff -u src/include/ctype.h:1.34 src/include/ctype.h:1.35
--- src/include/ctype.h:1.34	Sun Apr 28 19:39:56 2013
+++ src/include/ctype.h	Fri Mar 20 01:08:42 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ctype.h,v 1.34 2013/04/28 19:39:56 joerg Exp $	*/
+/*	$NetBSD: ctype.h,v 1.35 2020/03/20 01:08:42 joerg Exp $	*/
 
 /*
  * Copyright (c) 1989 The Regents of the University of California.
@@ -86,8 +86,11 @@ int	_tolower(int);
 int	_toupper(int);
 #endif
 
-#if defined(_ISOC99_SOURCE) || (_POSIX_C_SOURCE - 0) > 200112L || \
-(_XOPEN_SOURCE - 0) > 600 || defined(_NETBSD_SOURCE)
+#if (!defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
+!defined(_XOPEN_SOURCE)) || ((_POSIX_C_SOURCE - 0) >= 200112L || \
+ defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
+ (__cplusplus - 0) >= 201103L || (_XOPEN_SOURCE - 0) > 600 || \
+ defined(_NETBSD_SOURCE))
 int	isblank(int);
 #endif
 __END_DECLS

Index: src/include/stdio.h
diff -u src/include/stdio.h:1.98 src/include/stdio.h:1.99
--- src/include/stdio.h:1.98	Fri Dec 13 20:25:16 2019
+++ src/include/stdio.h	Fri Mar 20 01:08:42 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: stdio.h,v 1.98 2019/12/13 20:25:16 mrg Exp $	*/
+/*	$NetBSD: stdio.h,v 1.99 2020/03/20 01:08:42 joerg Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -41,6 +41,13 @@
 #include 
 #include 
 
+#if (!defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
+!defined(_XOPEN_SOURCE)) || ((_POSIX_C_SOURCE - 0) >= 200809L || \
+ defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
+ (__cplusplus - 0) >= 201103L || defined(_NETBSD_SOURCE))
+#define __STDIO_C99_FEATURES
+#endif
+
 #ifdef	_BSD_SIZE_T_
 typedef	_BSD_SIZE_T_	size_t;
 #undef	_BSD_SIZE_T_
@@ -307,8 +314,8 @@ __END_DECLS
 /*
  * IEEE Std 1003.1c-95, also adopted by X/Open CAE Spec Issue 5 Version 2
  */
-#if (_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500 || \
-defined(_REENTRANT) || defined(_NETBSD_SOURCE)
+#if defined(__STDIO_C99_FEATURES) || (_POSIX_C_SOURCE - 0) >= 199506L || \
+(_XOPEN_SOURCE - 0) >= 500 || defined(_REENTRANT)
 __BEGIN_DECLS
 void	flockfile(FILE *);
 int	ftrylockfile(FILE *);
@@ -318,7 +325,7 @@ int	getchar_unlocked(void);
 int	putc_unlocked(int, FILE *);
 int	putchar_unlocked(int);
 __END_DECLS
-#endif /* _POSIX_C_SOURCE >= 1995056 || _XOPEN_SOURCE >= 500 || ... */
+#endif /* C99 || _POSIX_C_SOURCE >= 1995056 || _XOPEN_SOURCE >= 500 || ... */
 
 /*
  * Functions defined in POSIX 1003.2 and XPG2 or later.
@@ -339,11 +346,9 @@ __END_DECLS
 /*
  * Functions defined in ISO XPG4.2, ISO C99, POSIX 1003.1-2001 or later.
  */
-#if ((__STDC_VERSION__ - 0) >= 199901L) || \
-((_POSIX_C_SOURCE - 0) >= 200112L) || \
+#if defined(__STDIO_C99_FEATURES) || (_POSIX_C_SOURCE - 0) >= 200112L || \
 (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
-((_XOPEN_SOURCE - 0) >= 500) || \
-defined(_ISOC99_SOURCE) || defined(_NETBSD_SOURCE)
+(_XOPEN_SOURCE - 0) >= 500
 __BEGIN_DECLS
 int	 snprintf(char * __restrict, size_t, const char * __restrict, ...)
 		__printflike(3, 4);
@@ -387,7 +392,7 @@ __END_DECLS
  * Functions defined in ISO C99.  Still put under _NETBSD_SOURCE due to
  * backward compatible.
  */
-#if defined(_ISOC99_SOURCE) || defined(_NETBSD_SOURCE)
+#if defined(__STDIO_C99_FEATURES)
 __BEGIN_DECLS
 int	 vscanf(const char * __restrict, __va_list)
 		__scanflike(1, 0);
@@ -397,7 +402,7 @@ int	 vsscanf(const char * __restrict, co
 __va_list)
 __scanflike(2, 0);
 __END_DECLS
-#endif /* _ISOC99_SOURCE || _NETBSD_SOURCE */
+#endif /* C99 */
 
 /*
  * Routines that are purely local.

Index: src/include/wchar.h
diff -u src/include/wchar.h:1.43 src/include/wchar.h:1.44
--- src/include/wchar.h:1.43	Fri Dec 28 13:11:46 2018
+++ src/include/wchar.h	Fri Mar 20 01:08:42 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: wchar.h,v 1.43 2018/12/28 13:11:46 maya Exp $	*/
+/*	$NetBSD: wchar.h,v 1.44 2020/03/20 01:08:42 joerg Exp $	*/
 
 /*-
  * Copyright (c)1999 Citrus Project,
@@ -151,9 +151,9 @@ long int wcstol(const wchar_t * __restri
 	wchar_t ** __restrict, int);
 double wcstod(const wchar_t * __restrict, wchar_t ** __restrict);
 
-#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) > 199901L || \
-defined(_NETBSD_SOURCE) || \
-	(_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600
+#if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0) >= 199901L || \
+(__cplusplus - 0) >= 201103L || defined(_NETBSD_SOURCE) 

CVS commit: src/include

2020-03-19 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Mar 20 01:08:43 UTC 2020

Modified Files:
src/include: ctype.h stdio.h wchar.h

Log Message:
Fix visibility of various C99 features, esp. for C++11.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/include/ctype.h
cvs rdiff -u -r1.98 -r1.99 src/include/stdio.h
cvs rdiff -u -r1.43 -r1.44 src/include/wchar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/include

2020-03-01 Thread Kamil Rytarowski
On 02.03.2020 03:58, matthew green wrote:
>>> On Sun, Mar 01, 2020 at 03:08:16PM +, Kamil Rytarowski wrote:
 Module Name:   src
 Committed By:  kamil
 Date:  Sun Mar  1 15:08:16 UTC 2020

 Modified Files:
src/include: stddef.h

 Log Message:
 Expose max_align_t to C99/C++
> 
> where was this discussed?

Yes.

> 
> why are controvesial changes being commited without any
> warning or discussion on tech-toolchain?
> 

It was discussed on ML.

> this is getting ridiculous.  please revert this and the
> GNU hashc hanges, and hold off any other changes pending
> discussions on public lists.
> 
> 

GNU hashes are not generated (and so used) on NetBSD.

> .mrg.
> 




signature.asc
Description: OpenPGP digital signature


  1   2   3   4   5   6   7   >