Skip to content

Commit

Permalink
Copy over confdefs.h into the build directory
Browse files Browse the repository at this point in the history
  • Loading branch information
kddnewton committed Jun 22, 2023
1 parent 1f2f88d commit 31cfb58
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ compile_commands.json

autom4te.cache
configure
configure~
config.log
config.status
Makefile
Expand Down
6 changes: 5 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
AC_INIT
AC_INIT(YARP, 0.5.0, https://github.com/ruby/yarp/issues/new, yarp, https://github.com/ruby/yarp)
AC_PROG_CC
AC_DEFINE(_XOPEN_SOURCE, 700)
AC_CHECK_FUNCS(mmap)
AC_CHECK_FUNCS(strncasecmp)
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

# Copy over the confdefs.h to build so other tools can use it.
mkdir -p build
cp confdefs.h build/confdefs.h
2 changes: 1 addition & 1 deletion ext/yarp/extension.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <unistd.h>
#endif

#define EXPECTED_YARP_VERSION "0.4.0"
#define EXPECTED_YARP_VERSION "0.5.0"

VALUE yp_token_new(yp_parser_t *parser, yp_token_t *token, rb_encoding *encoding);

Expand Down
2 changes: 1 addition & 1 deletion include/yarp.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "yarp/util/yp_strpbrk.h"

#define YP_VERSION_MAJOR 0
#define YP_VERSION_MINOR 4
#define YP_VERSION_MINOR 5
#define YP_VERSION_PATCH 0

void yp_serialize_content(yp_parser_t *parser, yp_node_t *node, yp_buffer_t *buffer);
Expand Down
2 changes: 1 addition & 1 deletion templates/java/org/yarp/Loader.java.erb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class Loader {
expect((byte) 'P');

expect((byte) 0);
expect((byte) 4);
expect((byte) 5);
expect((byte) 0);

// This loads the name of the encoding. We don't actually do anything
Expand Down
2 changes: 1 addition & 1 deletion templates/lib/yarp/serialize.rb.erb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module YARP

def load
io.read(4) => "YARP"
io.read(3).unpack("C3") => [0, 4, 0]
io.read(3).unpack("C3") => [0, 5, 0]

@encoding = Encoding.find(io.read(load_varint))
@source = source.force_encoding(@encoding).freeze
Expand Down

0 comments on commit 31cfb58

Please sign in to comment.