Skip to content

Commit 1eb5bc5

Browse files
committed
Import ruby/yarp
1 parent 319e302 commit 1eb5bc5

File tree

10 files changed

+319
-109
lines changed

10 files changed

+319
-109
lines changed

src/main/c/yarp/config.h.in

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
/* Define to 1 if you have the `snprintf' function. */
77
#undef HAVE_SNPRINTF
88

9-
/* Define to 1 if you have the `strncasecmp' function. */
10-
#undef HAVE_STRNCASECMP
11-
129
/* Define to the address where bug reports for this package should be sent. */
1310
#undef PACKAGE_BUGREPORT
1411

@@ -27,17 +24,5 @@
2724
/* Define to the version of this package. */
2825
#undef PACKAGE_VERSION
2926

30-
/* YP_VERSION */
31-
#undef YP_VERSION
32-
33-
/* YP_VERSION_MAJOR */
34-
#undef YP_VERSION_MAJOR
35-
36-
/* YP_VERSION_MINOR */
37-
#undef YP_VERSION_MINOR
38-
39-
/* YP_VERSION_PATCH */
40-
#undef YP_VERSION_PATCH
41-
4227
/* _XOPEN_SOURCE */
4328
#undef _XOPEN_SOURCE

src/main/c/yarp/configure

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.71 for YARP 0.4.0.
3+
# Generated by GNU Autoconf 2.71 for YARP _YP_VERSION.
44
#
55
# Report bugs to <https://github.com/ruby/yarp/issues/new>.
66
#
@@ -610,8 +610,8 @@ MAKEFLAGS=
610610
# Identity of this package.
611611
PACKAGE_NAME='YARP'
612612
PACKAGE_TARNAME='yarp'
613-
PACKAGE_VERSION='0.4.0'
614-
PACKAGE_STRING='YARP 0.4.0'
613+
PACKAGE_VERSION='_YP_VERSION'
614+
PACKAGE_STRING='YARP _YP_VERSION'
615615
PACKAGE_BUGREPORT='https://github.com/ruby/yarp/issues/new'
616616
PACKAGE_URL='https://github.com/ruby/yarp'
617617

@@ -1223,7 +1223,7 @@ if test "$ac_init_help" = "long"; then
12231223
# Omit some internal or obsolete options to make the list less imposing.
12241224
# This message is too long to be a string in the A/UX 3.1 sh.
12251225
cat <<_ACEOF
1226-
\`configure' configures YARP 0.4.0 to adapt to many kinds of systems.
1226+
\`configure' configures YARP _YP_VERSION to adapt to many kinds of systems.
12271227
12281228
Usage: $0 [OPTION]... [VAR=VALUE]...
12291229
@@ -1285,7 +1285,7 @@ fi
12851285

12861286
if test -n "$ac_init_help"; then
12871287
case $ac_init_help in
1288-
short | recursive ) echo "Configuration of YARP 0.4.0:";;
1288+
short | recursive ) echo "Configuration of YARP _YP_VERSION:";;
12891289
esac
12901290
cat <<\_ACEOF
12911291
@@ -1366,7 +1366,7 @@ fi
13661366
test -n "$ac_init_help" && exit $ac_status
13671367
if $ac_init_version; then
13681368
cat <<\_ACEOF
1369-
YARP configure 0.4.0
1369+
YARP configure _YP_VERSION
13701370
generated by GNU Autoconf 2.71
13711371
13721372
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -1551,7 +1551,7 @@ cat >config.log <<_ACEOF
15511551
This file contains any messages produced by compilers while
15521552
running configure, to aid debugging if configure makes a mistake.
15531553
1554-
It was created by YARP $as_me 0.4.0, which was
1554+
It was created by YARP $as_me _YP_VERSION, which was
15551555
generated by GNU Autoconf 2.71. Invocation command line was
15561556
15571557
$ $0$ac_configure_args_raw
@@ -3199,18 +3199,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
31993199
printf "%s\n" "#define _XOPEN_SOURCE 700" >>confdefs.h
32003200

32013201

3202-
printf "%s\n" "#define YP_VERSION_MAJOR 0" >>confdefs.h
3203-
3204-
3205-
printf "%s\n" "#define YP_VERSION_MINOR 4" >>confdefs.h
3206-
3207-
3208-
printf "%s\n" "#define YP_VERSION_PATCH 0" >>confdefs.h
3209-
3210-
3211-
printf "%s\n" "#define YP_VERSION \"0.4.0\"" >>confdefs.h
3212-
3213-
32143202

32153203
ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
32163204
if test "x$ac_cv_func_mmap" = xyes
@@ -3226,13 +3214,6 @@ then :
32263214

32273215
fi
32283216

3229-
ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
3230-
if test "x$ac_cv_func_strncasecmp" = xyes
3231-
then :
3232-
printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h
3233-
3234-
fi
3235-
32363217

32373218
ac_config_headers="$ac_config_headers include/yarp/config.h:config.h.in"
32383219

@@ -3737,7 +3718,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37373718
# report actual input values of CONFIG_FILES etc. instead of their
37383719
# values after options handling.
37393720
ac_log="
3740-
This file was extended by YARP $as_me 0.4.0, which was
3721+
This file was extended by YARP $as_me _YP_VERSION, which was
37413722
generated by GNU Autoconf 2.71. Invocation command line was
37423723
37433724
CONFIG_FILES = $CONFIG_FILES
@@ -3802,7 +3783,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
38023783
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
38033784
ac_cs_config='$ac_cs_config_escaped'
38043785
ac_cs_version="\\
3805-
YARP config.status 0.4.0
3786+
YARP config.status _YP_VERSION
38063787
configured by $0, generated by GNU Autoconf 2.71,
38073788
with options \\"\$ac_cs_config\\"
38083789

src/main/c/yarp/include/yarp/defines.h

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,13 @@
3838
# define inline __inline
3939
#endif
4040

41-
// strncasecmp
42-
#if !defined(HAVE_STRNCASECMP) && !defined(strncasecmp)
43-
// In case strncasecmp isn't present on the system, we provide our own.
44-
int yp_strncasecmp(const char *string1, const char *string2, size_t length);
45-
# define strncasecmp yp_strncasecmp
46-
#endif
41+
int yp_strncasecmp(const char *string1, const char *string2, size_t length);
42+
43+
int yp_snprintf(char *dest, YP_ATTRIBUTE_UNUSED size_t size, const char *format, ...);
4744

48-
// snprintf
49-
#if !defined(HAVE_SNPRINTF) && !defined(snprintf)
50-
// In case snprintf isn't present on the system, we provide our own that
51-
// simply forwards to the less-safe sprintf.
52-
int yp_snprintf(char *dest, YP_ATTRIBUTE_UNUSED size_t size, const char *format, ...);
53-
# define snprintf yp_snprintf
45+
#if defined(HAVE_SNPRINTF)
46+
// We use snprintf if it's available
47+
# define yp_snprintf snprintf
5448
#endif
5549

5650
#endif
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#define YP_VERSION_MAJOR 0
2+
#define YP_VERSION_MINOR 4
3+
#define YP_VERSION_PATCH 0
4+
5+
#define YP_VERSION "0.4.0"

0 commit comments

Comments
 (0)