aboutsummaryrefslogtreecommitdiffstats
path: root/posix
diff options
context:
space:
mode:
Diffstat (limited to 'posix')
-rw-r--r--posix/ChangeLog8
-rw-r--r--posix/gawkmisc.c12
2 files changed, 14 insertions, 6 deletions
diff --git a/posix/ChangeLog b/posix/ChangeLog
index 2ae8093a..05f92abc 100644
--- a/posix/ChangeLog
+++ b/posix/ChangeLog
@@ -1,3 +1,11 @@
+2021-01-08 Arnold D. Robbins <arnold@skeeve.com>
+
+ * gawkmisc.c (quote): Make const char *.
+ (defpath): Make const char *.
+ (deflibpath): Make const char *.
+ (envsep): Make const char *.
+ (gawk_name): Now returns const char *.
+
2020-04-14 Arnold D. Robbins <arnold@skeeve.com>
* 5.1.0: Release tar ball made.
diff --git a/posix/gawkmisc.c b/posix/gawkmisc.c
index 16cfeb03..d2e33f41 100644
--- a/posix/gawkmisc.c
+++ b/posix/gawkmisc.c
@@ -24,10 +24,10 @@
#include <io.h>
#endif
-char quote = '\'';
-char *defpath = DEFPATH;
-char *deflibpath = DEFLIBPATH;
-char envsep = ':';
+const char quote = '\'';
+const char *defpath = DEFPATH;
+const char *deflibpath = DEFLIBPATH;
+const char envsep = ':';
#ifndef INVALID_HANDLE
/* FIXME: is this value for INVALID_HANDLE correct? */
@@ -36,10 +36,10 @@ char envsep = ':';
/* gawk_name --- pull out the "gawk" part from how the OS called us */
-char *
+const char *
gawk_name(const char *filespec)
{
- char *p;
+ const char *p;
/* "path/name" -> "name" */
p = strrchr(filespec, '/');