summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2023-03-19 18:19:35 +0200
committerArnold D. Robbins <arnold@skeeve.com>2023-03-19 18:19:35 +0200
commit8bf639a108edfb478f8e0b11d41ddea5d85c7826 (patch)
tree3bdb41f86043cbb7f374dc7420fd702422098e1a
parented09e9c66665f98eb070cc28d87abb9cb0096c3f (diff)
parent11dd1f9cc4f36ab2ae0f56ee54832781b61bdaa9 (diff)
downloadgawk-8bf639a108edfb478f8e0b11d41ddea5d85c7826.tar.gz
Merge branch 'gawk-5.2-stable'
-rw-r--r--vms/ChangeLog6
-rwxr-xr-xvms/generate_config_vms_h_gawk.com12
-rw-r--r--vms/redirect.h16
3 files changed, 25 insertions, 9 deletions
diff --git a/vms/ChangeLog b/vms/ChangeLog
index 752f74f2..4285a1d1 100644
--- a/vms/ChangeLog
+++ b/vms/ChangeLog
@@ -1,3 +1,9 @@
+2023-03-18 John E. Malmberg <wb8tyw@qsl.net>
+
+ * redirect.h: Fix prototype for read()
+ * generate_config_vms_h_gawk.com: Disable OpenVMS stat.h extensions
+ define HAVE_STRPTIME=1
+
2023-02-03 John E. Malmberg <wb8tyw@qsl.net>
* config_h.com: Handle HAVE_C_BOOL
diff --git a/vms/generate_config_vms_h_gawk.com b/vms/generate_config_vms_h_gawk.com
index b198585d..d71500f7 100755
--- a/vms/generate_config_vms_h_gawk.com
+++ b/vms/generate_config_vms_h_gawk.com
@@ -13,7 +13,7 @@ $! This generates a []config.h file and also a config_vms.h file,
$! which is used to supplement that file.
$!
$!
-$! Copyright (C) 2014, 2016, 2019 the Free Software Foundation, Inc.
+$! Copyright (C) 2014, 2016, 2019, 2023 the Free Software Foundation, Inc.
$!
$! This file is part of GAWK, the GNU implementation of the
$! AWK Progamming Language.
@@ -199,6 +199,16 @@ $ write cvh "#include <stdio.h>"
$ write cvh "#include <time.h>"
$ write cvh "#include <stsdef.h>"
$ write cvh "#include <string.h>"
+$ write cvh "#ifndef _POSIX_C_SOURCE"
+$ write cvh "#define _POSIX_C_SOURCE 2"
+$ write cvh "#define _XOPEN_SOURCE 1"
+$ write cvh "#define _XOPEN_SOURCE_EXTENDED 1"
+$ write cvh "#include <stat.h>"
+$ write cvh "#undef _POSIX_C_SOURCE"
+$ write cvh "#undef _XOPEN_SOURCE"
+$ write cvh "#undef _XOPEN_SOURCE_EXTENDED"
+$ write cvh "#endif"
+$ write cvh "#define HAVE_STRPTIME 1"
$ write cvh "#undef getopt"
$ write cvh "#undef optopt"
$ write cvh "#undef optind"
diff --git a/vms/redirect.h b/vms/redirect.h
index b7388c96..7e61f269 100644
--- a/vms/redirect.h
+++ b/vms/redirect.h
@@ -2,23 +2,23 @@
* redirect.h --- definitions for functions that are OS specific.
*/
-/*
- * Copyright (C) 1986, 1988, 1989, 1991-1993, 1996, 1997, 2007, 2010, 2011
- * the Free Software Foundation, Inc.
- *
+/*
+ * Copyright (C) 1986, 1988, 1989, 1991-1993, 1996, 1997, 2007, 2010, 2011,
+ * 2023 the Free Software Foundation, Inc.
+ *
* This file is part of GAWK, the GNU implementation of the
* AWK Programming Language.
- *
+ *
* GAWK is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
- *
+ *
* GAWK is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
@@ -124,7 +124,7 @@ extern int fileno(FILE *);
extern int close(int);
extern int dup(int);
extern int dup2(int, int);
-extern int read(int, void *, int);
+extern ssize_t read(int, void *, size_t);
extern int getpgrp(void);
extern void tzset(void);