To see which line endings are in the index and in the working copy the
following command can be used:
git ls-files --eol
Git additionally provides .gitattributes file to specify if some files
need to have specific line endings on all platforms (either CRLF or LF).
Changed files shouldn't cause issues on modern Windows platforms because
also Git can do output conversion is core.autocrlf=true is set on
Windows and use CRLF lineendings in all files in working tree.
Unless CRLF files are tracked specifically, Git by default tracks all
files in the index with LF end of lines.
Peter Kokot [Wed, 26 Sep 2018 23:05:53 +0000 (01:05 +0200)]
Set SIZEOF_SIZE_T for windows platforms
The size of `size_t` is 4 bytes on 32bit Windows platforms and 8 bytes
on 64bit Windows platforms. This patch defines the SIZEOF_SIZE_T symbols
for both instead of using only 4 for both.
Peter Kokot [Sun, 16 Sep 2018 17:16:47 +0000 (19:16 +0200)]
Remove HAVE_STRINGS_H
This patch removes not needed `HAVE_STRINGS_H` symbol as was defined by
Autoconf in configure.ac and by CMake.
The windows/testc.c file also doesn't need the POSIX `<strings.h>` [1]
header file included as none of the functions defined by it are used:
* ffs
* strcasecmp
* strcasecmp_l
* strncasecmp
* strncasecmp_l
and the `<string.h>` file (part of C89 standard and above) [2] is
sufficient for it.
Peter Kokot [Sun, 16 Sep 2018 00:49:27 +0000 (02:49 +0200)]
Remove HAVE_PROTOTYPES and HAVE_STDARG_PROTOTYPES
The C89 standard and later defines the `<stdarg.h>` header as part of
the standard headers [1] and on current systems it is always present.
Checking for presence and functionality of the `<stdarg.h>` header and
variadic functions is not relevant anymore on current systems since this
is always available.
Also Autoconf suggests doing this and relying on C89 or above [2] and [3].
As an alternative, outdated versions of POSIX defined the legacy header
`<varargs.h>` [4].
This patch modernize the `<stdarg.h>` usage a bit.
Unused internal macro `va_init_list()` has been replaced with
`va_start()`.
Checking if functions support prototypes is also not relevant anymore
so the `HAVE_PROTOTYPES` symbol has been removed likewise.
Peter Kokot [Fri, 7 Sep 2018 18:30:02 +0000 (20:30 +0200)]
Remove obsolescent AC_HEADER_STDC
Autoconf 2.59d (released in 2006) [1] started promoting several macros
as not relevant for newer systems anymore, including the `AC_HEADER_STDC`.
This macro checks if given system has C89 compliant header files such
as <string.h>, <stdlib.h>, <stdarg.h>, <float.h>,... and defines the
`STDC_HEADERS` symbol [2]. Case is that current systems should be well
supported with at least C89 standard headers [3].
Given headers are still additionally checked with the `AC_PROG_CC`
macro, yet not needed anyway.
For cmake build system this applies similarly and the manual custom
check of the standard headers can be removed likewise.
since they aren't used in the current Oniguruma code base. They were
originally mostly part of the build system files where they were defined
based on the system and the presence of the functions strcasecmp,
strncasecmp, strftime, strtod, strtol, strtoul, fmod, cosh, tanh, sinh,
frexp, mktime, modf. Since these functions aren't used in the code the
symbols for checking them can be also removed.
The `HAVE_TZNAME` was part of the AC_STRUCT_TIMEZONE from Autoconf and
other build system parts that checks if struct `tm` has a `tm_zone `
member. This is also not used in the current code base so can be removed.
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].