From 84f6bcd255d10b593298e0408011e9f03d1ab18c Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Thu, 22 Aug 2013 21:52:11 +0300 Subject: Clean up some -Wextra compile warnings in extensions. --- extension/inplace.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'extension/inplace.c') diff --git a/extension/inplace.c b/extension/inplace.c index ad6f0e23..133b40f0 100644 --- a/extension/inplace.c +++ b/extension/inplace.c @@ -88,6 +88,8 @@ static struct { static void at_exit(void *data, int exit_status) { + (void) data; /* silence warnings */ + (void) exit_status; /* silence warnings */ if (state.tname) { unlink(state.tname); free(state.tname); -- cgit v1.2.3 From 29e3ae329c550b884169b7db20775cd74b95b77a Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Thu, 24 Oct 2013 22:05:08 +0300 Subject: Fix extension portability for AIX. --- extension/inplace.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'extension/inplace.c') diff --git a/extension/inplace.c b/extension/inplace.c index 133b40f0..91b1a229 100644 --- a/extension/inplace.c +++ b/extension/inplace.c @@ -27,8 +27,12 @@ #include #endif -#define _XOPEN_SOURCE -#define _XOPEN_SOURCE_EXTENDED +#ifndef _XOPEN_SOURCE +# define _XOPEN_SOURCE +#endif +#ifndef _XOPEN_SOURCE_EXTENDED +# define _XOPEN_SOURCE_EXTENDED 1 +#endif #include #include -- cgit v1.2.3 From b4343b17479151d438d32530cdd2541262e3088e Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Sat, 8 Mar 2014 14:41:00 -0500 Subject: Add memory allocation functions to gawk API. --- extension/inplace.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'extension/inplace.c') diff --git a/extension/inplace.c b/extension/inplace.c index 91b1a229..b6228a5b 100644 --- a/extension/inplace.c +++ b/extension/inplace.c @@ -96,7 +96,7 @@ at_exit(void *data, int exit_status) (void) exit_status; /* silence warnings */ if (state.tname) { unlink(state.tname); - free(state.tname); + gawk_free(state.tname); state.tname = NULL; } } @@ -242,7 +242,7 @@ do_inplace_end(int nargs, awk_value_t *result) if (link(filename.str_value.str, bakname) < 0) fatal(ext_id, _("inplace_end: link(`%s', `%s') failed (%s)"), filename.str_value.str, bakname, strerror(errno)); - free(bakname); + gawk_free(bakname); } #ifdef __MINGW32__ @@ -252,7 +252,7 @@ do_inplace_end(int nargs, awk_value_t *result) if (rename(state.tname, filename.str_value.str) < 0) fatal(ext_id, _("inplace_end: rename(`%s', `%s') failed (%s)"), state.tname, filename.str_value.str, strerror(errno)); - free(state.tname); + gawk_free(state.tname); state.tname = NULL; return make_number(0, result); } -- cgit v1.2.3 From 69d85d51dfd0f2e3b464585633d270f06fa1e846 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 31 Mar 2014 22:17:13 +0300 Subject: Update copyright years on files changed in 2014. --- extension/inplace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'extension/inplace.c') diff --git a/extension/inplace.c b/extension/inplace.c index b6228a5b..e2f8b73f 100644 --- a/extension/inplace.c +++ b/extension/inplace.c @@ -3,7 +3,7 @@ */ /* - * Copyright (C) 2013 the Free Software Foundation, Inc. + * Copyright (C) 2013, 2014 the Free Software Foundation, Inc. * * This file is part of GAWK, the GNU implementation of the * AWK Programming Language. -- cgit v1.2.3