Peter Kokot [Thu, 6 Sep 2018 09:54:49 +0000 (11:54 +0200)]
Remove HAVE_STRING_H
The C89 standard and later defines the <string.h> header as part of the
standard headers [1] and on current systems it is always present.
Code included also <strings.h> header as an alterinative in some files.
This kind of check was relevant on some older systems where the
<strings.h> file included definitions for the C89 compliant <string.h>.
Today such alternative check is not required anymore. The <strings.h>
file is part of the POSIX definition these days. Current code doesn't
require the <strings.h> files in cases of these patched files.
Also Autoconf suggests doing this and relying on C89 or above [2] and [3].
Peter Kokot [Thu, 6 Sep 2018 05:49:18 +0000 (07:49 +0200)]
Upgrade deprecated AC_OUTPUT macro call
Autoconf 2.50 made several changes to macro calls. These include also
arguments passed to AC_OUTPUT macro. The upgrading chapter in Autoconf
documentation includes an example of using AC_OUTPUT with
AC_CONFIG_FILES and AC_CONFIG_COMMANDS:
- https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Obsolete-Macros.html
Systems out there should be well supported by now.
This patch was created with the help of autoupdate script:
autoupdate <file>
More info on where exactly this got deprecated:
- ftp://ftp.gnu.org/old-gnu/Manuals/autoconf-2.13/html_mono/autoconf.html
- ftp://ftp.auckland.ac.nz/pub/gnu/Manuals/autoconf-2.52/html_chapter/autoconf_15.html
- http://git.savannah.gnu.org/cgit/autoconf.git/tree/NEWS
Peter Kokot [Thu, 6 Sep 2018 04:00:14 +0000 (06:00 +0200)]
Remove AC_C_CONST
Autoconf 2.59d (released in 2006) [1] started promoting several macros
as not relevant for newer systems, including the `AC_C_CONST`.
The `const` keyword is used in C since C89. On old systems some compilers
lacked the `const` and this macro defined it to be empty. This check was
relevant on systems with compilers before C89 and on current systems it
can be omitted since ˙const` is always available. [2]
Peter Kokot [Thu, 6 Sep 2018 03:40:25 +0000 (05:40 +0200)]
Remove AC_HEADER_TIME
Autoconf 2.59d (released in 2006) [1] started promoting several macros
as not relevant for newer systems anymore, including the `AC_HEADER_TIME`.
This macro checks if both `<sys/time.h>` and `<time.h>` can be included
at the same time and defines the `TIME_WITH_SYS_TIME` and
`HAVE_SYS_TIME_H` symbols. On current system such check is not relevant
anymore because in case both headers are present both can be also
included at the same time.
Peter Kokot [Thu, 6 Sep 2018 03:07:37 +0000 (05:07 +0200)]
Remove unused old symbols for string.h functions
The C89 standard and later defines the <string.h> header as part of the
standard headers [1]. Functions memcmp, memmove, strerror, strchr, strstr,
and others are all part of C89 and <string.h> header definition.
Some build systems used to define the presence of these functions via
HAVE_MEMCMP, HAVE_MEMMOVE, HAVE_STRERROR, HAVE_STRCHR, HAVE_STRSTR
symbols. These aren't used in oniguruma library anymore and can be
ommitted from the config files for windows systems.
Peter Kokot [Thu, 6 Sep 2018 02:45:45 +0000 (04:45 +0200)]
Remove AC_FUNC_MEMCMP
Autoconf 2.59d (released in 2006) [1] started promoting several macros
as not relevant for newer systems anymore, including the `AC_FUNC_MEMCMP`.
On some old systems such as SunOS 4.1.3 (EOL in 2003) and NeXT x86
OpenStep (discontinued) the `memcmp` function wasn't present or it
didn't work properly. [2]
On current systems including at least Solaris 10+ this check is not
relevant anymore.
Peter Kokot [Wed, 5 Sep 2018 03:42:32 +0000 (05:42 +0200)]
Remove HAVE_STDLIB_H
The `<stdlib.h>` header file is part of the standard C89 headers [1] and
on current systems there is no need to do a manual check if header is
present anymore [2].
Build systems used to check for the presence of the header file and defined
the `HAVE_STDLIB_H` symbol:
- Autoconf in configure.ac
- Cmake in CMakeLists.txt
This patch removes these checks and prepares for another patch to remove
the obsolescent `AC_HEADER_STDC` Autoconf macro and the obsolescent
`STDC_HEADERS` symbol.
Peter Kokot [Wed, 5 Sep 2018 02:25:01 +0000 (04:25 +0200)]
Remove HAVE_FLOAT_H
The `<float.h>` header file is part of the standard C89 headers [1] and
on current systems there is no need to do a manual check if header is
present anymore [2].
Build systems used to check for the presence of the header file and defined
the `HAVE_FLOAT_H` symbol.
Peter Kokot [Wed, 5 Sep 2018 00:05:32 +0000 (02:05 +0200)]
Remove HAVE_LIMITS_H
The `<limits.h>` header file is part of the standard C89 headers [1] and
on current systems there is no need to do a manual check anymore if
header is present.
Build systems checked for the presence of the header file and defined
the `HAVE_LIMITS_H` symbol:
- Autoconf in configure.a [2]
- cmake in CMakeLists.txt
Peter Kokot [Mon, 23 Jul 2018 05:15:06 +0000 (07:15 +0200)]
Remove unused RETSIGTYPE
The RETSIGTYPE defines the signal type. In K&R C, this could be int or
void. Since C89 it is always void. Also the RETSIGTYPE is not used in
current code.
Peter Kokot [Thu, 5 Jul 2018 02:00:26 +0000 (04:00 +0200)]
Replace AC_CONFIG_HEADER with AC_CONFIG_HEADERS
Autoconf doesn't mention the AC_CONFIG_HEADER macro since the v2.13
released in 1999 anywhere in the documentation. Future of this macro is
unclear and commented as possible candidate for obsoletion in the
autoconf source code. Since it is just a wrapper around the main
AC_CONFIG_HEADERS macro, the functionality is the same, and also more
clear to find it in the autoconf documentation and avoid possible future
obsoletion.
Peter Kokot [Tue, 3 Jul 2018 00:23:04 +0000 (02:23 +0200)]
Replace obsolete AC_TRY_COMPILE with AC_COMPILE_IFELSE
Autoconf made several macros obsolete including the AC_TRY_COMPILE in
2001 in version 2.50:
http://git.savannah.gnu.org/cgit/autoconf.git/tree/ChangeLog.2
http://git.savannah.gnu.org/cgit/autoconf.git/tree/ChangeLog.3
It should be replaced with the current AC_COMPILE_IFELSE instead.
Peter Kokot [Sun, 1 Jul 2018 14:54:20 +0000 (16:54 +0200)]
Convert README_japanese to UTF-8
Opening README_japanese on some editors causes issues and it automatically
opens it in UTF-8 so characters are not shown properly. This patch
converts the EUC-JP encoding to UTF-8 for convenience of seeing it
properly.
Peter Kokot [Fri, 29 Jun 2018 12:09:59 +0000 (14:09 +0200)]
Remove unused defines from Windows configure file
The definitions of the HAVE_ST_RDEV and HAVE_STRUCT_STAT_ST_RDEV
would provide checks for the members of the stat struct. Since the
st_rdev member is not used in this code these checks can be simplified
by removal.