Skip to content

Commit

Permalink
Minor patches to match changes in gawk API.
Browse files Browse the repository at this point in the history
  • Loading branch information
ajschorr committed Aug 9, 2012
1 parent d95d068 commit 2f45fc1
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 4 deletions.
9 changes: 9 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2012-08-09 Andrew J. Schorr <[email protected]>

* configure.ac: Version 0.3.7 to match minor changes in gawk API.
* strhash.c: Must now include <sys/stat.h>.
* varinit.c: Include <sys/stat.h>.
(gawk_api_varinit_array): After installing an array, it is no longer
necessary to call sym_lookup, since sym_update now updates the
array_cookie value.

2012-08-01 Andrew J. Schorr <[email protected]>

* configure.ac: Version 0.3.6. All checks now pass on Linux and Cygwin.
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.

AC_INIT([Gawk Extension Libraries], 0.3.6, [email protected], gawkextlib)
AC_INIT([Gawk Extension Libraries], 0.3.7, [email protected], gawkextlib)

AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build-aux])
Expand Down
5 changes: 5 additions & 0 deletions extension/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2012-08-09 Andrew J. Schorr <[email protected]>

* common.h: After recent gawkapi patch, must include <sys/stat.h>
before gawkextlib.h.

2012-08-07 Andrew J. Schorr <[email protected]>

* common.h (__UNUSED): New define. If using gcc, this will suppress
Expand Down
1 change: 1 addition & 0 deletions extension/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/stat.h>
#include "gawkextlib.h"

static const gawk_api_t *api; /* for convenience macros to work */
Expand Down
1 change: 1 addition & 0 deletions strhash.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ static int AVG_CHAIN_MAX = 2; /* 11/2002: Modern machines are bigger, cut this d
#include <string.h>
#endif

#include <sys/stat.h>
#include <stdio.h>
#include <errno.h>

Expand Down
6 changes: 3 additions & 3 deletions varinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/stat.h>
#include "gawkextlib.h"

#undef DBGMSG
Expand Down Expand Up @@ -89,9 +90,8 @@ gawk_api_varinit_array(const gawk_api_t *api, awk_ext_id_t ext_id,
else {
val.val_type = AWK_ARRAY;
val.array_cookie = create_array();
/* Note: the array_cookie value changes after calling sym_update,
so we must call sym_lookup after sym_update */
if (!sym_update(name, &val) || !sym_lookup(name, AWK_ARRAY, &val))
/* Note: the sym_update call updates the array_cookie */
if (!sym_update(name, &val))
return 0;
}
*cookie_result = val.array_cookie;
Expand Down

0 comments on commit 2f45fc1

Please sign in to comment.