From: Michael Wallner Date: Mon, 3 Dec 2018 15:20:59 +0000 (+0100) Subject: build cleanup X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=fb8f7887c289ae74d6e8dd85d55ae09e6796e890;p=m6w6%2Fext-psi build cleanup --- diff --git a/Makefile.frag b/Makefile.frag index 64dd4a2..92a8d54 100644 --- a/Makefile.frag +++ b/Makefile.frag @@ -1,10 +1,14 @@ -# provide headers in builddir, so they do not end up in /usr/include/ext/psi/src +# provide headers in builddir, so they do not end up in a "src" subdirectory PHP_PSI_HEADERS := $(addprefix $(PHP_PSI_BUILDDIR)/,$(PHP_PSI_HEADERS)) PHP_PSI_SOURCES := $(addprefix $(PHP_PSI_SRCDIR)/,$(PHP_PSI_SOURCES)) PHP_PSI_GENERATED:=$(addprefix $(PHP_PSI_SRCDIR)/,$(PHP_PSI_GENERATED)) +$(PHP_PSI_BUILDDIR)/calc: + mkdir -p $@ +$(PHP_PSI_BUILDDIR)/calc/%.h: $(PHP_PSI_SRCDIR)/src/calc/%.h | $(PHP_PSI_BUILDDIR)/calc + @cat >$@ <$< $(PHP_PSI_BUILDDIR)/types: mkdir -p $@ $(PHP_PSI_BUILDDIR)/types/%.h: $(PHP_PSI_SRCDIR)/src/types/%.h | $(PHP_PSI_BUILDDIR)/types diff --git a/config.m4 b/config.m4 index 5ea9c37..75ea3f7 100644 --- a/config.m4 +++ b/config.m4 @@ -1,8 +1,8 @@ m4_foreach(incfile, [ + [ax/ax_check_compile_flag.m4], [ax/ax_check_sign.m4], [ax/ax_pthread.m4], [psi/psi.m4], - [psi/psi_const.m4], [psi/psi_type.m4]], [ dnl pecl build sinclude([m4/]incfile) @@ -42,6 +42,7 @@ if test "$PHP_PSI" != no; then PSI_CHECK_CPP PSI_CHECK_STD_TYPES + AC_HEADER_DIRENT AC_FUNC_FNMATCH AC_FUNC_MMAP AC_CHECK_FUNCS([mknodat eaccess]) diff --git a/m4/psi/psi.m4 b/m4/psi/psi.m4 index c534ed4..9c2c6d2 100644 --- a/m4/psi/psi.m4 +++ b/m4/psi/psi.m4 @@ -4,8 +4,6 @@ AC_DEFUN(PSI_CONFIG_INIT, [ psi_save_LIBS=$LIBS LIBS= - ac_includes_default="AC_INCLUDES_DEFAULT" - AC_MSG_CHECKING([psi source dir]) PHP_PSI_SRCDIR=PHP_EXT_SRCDIR(psi) AC_MSG_RESULT([$PHP_PSI_SRCDIR]) @@ -22,11 +20,7 @@ AC_DEFUN(PSI_CONFIG_INIT, [ PSI_STDTYPES= PSI_CONSTS= - AC_CONFIG_FILES( - [$PHP_PSI_BUILDDIR/php_psi_stdinc.h:$PHP_PSI_SRCDIR/php_psi_stdinc.h.in] - [$PHP_PSI_BUILDDIR/php_psi_posix.h:$PHP_PSI_SRCDIR/php_psi_posix.h.in] - [$PHP_PSI_BUILDDIR/php_psi_cpp.h:$PHP_PSI_SRCDIR/php_psi_cpp.h.in] - ) + AC_CONFIG_FILES([$PHP_PSI_BUILDDIR/php_psi_predef.h:$PHP_PSI_SRCDIR/php_psi_predef.h.in]) ]) @@ -37,10 +31,7 @@ AC_DEFUN(PSI_CONFIG_DONE, [ LIBS=$psi_save_LIBS PHP_EVAL_LIBLINE($psi_eval_LIBS, PSI_SHARED_LIBADD) - [PSI_INCLUDES]="PSI_INCLUDES" - AC_SUBST([PSI_INCLUDES]) AC_SUBST([PSI_STDTYPES]) - AC_SUBST([PSI_CONSTS]) AC_SUBST([PSI_CPP_SEARCH]) AC_SUBST([PSI_CPP_PREDEF]) @@ -53,8 +44,8 @@ AC_DEFUN(PSI_CONFIG_DONE, [ PHP_ADD_BUILD_DIR($PHP_PSI_BUILDDIR/src/types) PHP_PSI_HEADERS=" \ - src/calc/basic.h src/calc/bin.h src/calc/bool.h src/calc/cast.h \ - src/calc/unary.h src/calc/cmp.h src/calc/oper.h \ + calc/basic.h calc/bin.h calc/bool.h calc/cast.h \ + calc/unary.h calc/cmp.h calc/oper.h \ `(cd $PHP_PSI_SRCDIR/src && ls *.h types/*.h)` \ " # parser_* should come first @@ -148,6 +139,30 @@ AC_DEFUN([PSI_CHECK_MAINTAINER_MODE], [ PSI_DEPS=true PHP_SUBST(PSI_DEPS) CFLAGS="$CFLAGS -Wall -Wextra" + m4_foreach(flag, [ + [fstack-protector], + [Wduplicate-decl-specifier], + [Wnull-dereference], + [Winit-self], + [Wimplicit-fallthrough=1], + [Wshift-overflow], + [Wuninitialized], + [Walloc-zero], + [Wduplicated-branches], + [Wduplicated-cond], + [Wtrampolines], + [Wpointer-arith], + [Wcast-align], + [Wmissing-prototypes], + [Wmissing-declarations], + [Wredundant-decls], + [Wdisabled-optimization], + [Wno-sign-compare], + [Wno-unused-parameter], + [Wno-cast-function-type]], + [ + AX_CHECK_COMPILE_FLAG([-][flag], [CFLAGS="$CFLAGS -"]flag) + ]) else PSI_DEPS=false fi @@ -175,110 +190,6 @@ AC_DEFUN(PSI_CHECK_PTHREAD, [ AC_REQUIRE([PSI_PTHREAD_ONCE]) ]) -dnl PSI_INCLUDES() -dnl Expands to a complete list of include statements including -dnl autoconf defaults. -AC_DEFUN(PSI_INCLUDES, [ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE -#endif -#ifndef _REENTRANT -# define _REENTRANT -#endif -$ac_includes_default -#ifdef HAVE_STDBOOL_H -# include -#else -# ifndef HAVE__BOOL -# ifdef __cplusplus -typedef bool _Bool; -# else -# define _Bool signed char -# endif -# endif -# define bool _Bool -# define false 0 -# define true 1 -# define __bool_true_false_are_defined 1 -#endif -#ifdef HAVE_ERRNO_H -# include -#endif -#ifdef HAVE_GLOB_H -# include -#endif -#ifdef HAVE_LOCALE_H -# include -#endif -#ifdef HAVE_XLOCALE_H -# include -#endif -#ifdef HAVE_NETINET_IN_H -# include -#endif -#ifdef HAVE_NETINET_TCP_H -# include -#endif -#ifdef HAVE_ARPA_NAMESER_H -# include -#endif -#ifdef HAVE_ARPA_INET_H -# include -#endif -#ifdef HAVE_FCNTL_H -# include -#endif -#ifdef HAVE_RELIC_H -# include -#elif HAVE_NDBM_H -# include -#elif HAVE_GDBM_NDBM_H -# include -#endif -#ifdef HAVE_NETDB_H -# include -#endif -#ifdef HAVE_POLL_H -# include -#endif -#ifdef HAVE_RESOLV_H -# include -#endif -#ifdef HAVE_SYS_SELECT_H -# include -#endif -#ifdef HAVE_SYS_SOCKET_H -# include -#endif -#ifdef HAVE_SYS_TIME_H -# include -#endif -#ifdef HAVE_SYS_TIMES_H -# include -#endif -#ifdef HAVE_SYS_UIO_H -# include -#endif -#ifdef HAVE_SYS_UTSNAME_H -# include -#endif -#ifdef HAVE_TIME_H -# include -#endif -#ifdef HAVE_SIGNAL_H -# include -#endif -#ifdef HAVE_SYSLOG_H -# include -#endif -#ifdef HAVE_WCHAR_H -# include -#endif -#ifdef HAVE_WCTYPE_H -# include -#endif -]) - dnl PSI_PKG_CONFIG() dnl Check for `pkg-config` and add possible libjit and libffi directories to dnl $PKG_CONFIG_PATH, because those libs often ship with headers etc. in @@ -300,14 +211,9 @@ dnl `if` condition to test if $ac_cv_sizeof_$1 is greater than 0. AC_DEFUN([PSI_SH_TEST_SIZEOF], [test -n "$AS_TR_SH([ac_cv_sizeof_]$1)" && test "$AS_TR_SH([ac_cv_sizeof_]$1)" -gt 0]) dnl PSI_CHECK_SIZEOF(type, special-includes) -dnl AC_CHECK_SIZEOF wrapper with PSI_INCLUDES -dnl Defines psi\\SIZEOF_ pre-defined constant in $PSI_CONSTS_H. AC_DEFUN(PSI_CHECK_SIZEOF, [ - AC_CHECK_SIZEOF($1, [], PSI_INCLUDES + AC_CHECK_SIZEOF($1, [], $2) - if PSI_SH_TEST_SIZEOF($1); then - psi_add_int_const "AS_TR_CPP([SIZEOF_]$1)" "$AS_TR_SH([ac_cv_sizeof_]$1)" - fi ]) dnl PSI_CHECK_LIBJIT() diff --git a/m4/psi/psi_const.m4 b/m4/psi/psi_const.m4 index 98aeed4..e355583 100644 --- a/m4/psi/psi_const.m4 +++ b/m4/psi/psi_const.m4 @@ -25,5 +25,5 @@ AC_DEFUN(PSI_CONST, [ psi_add_int_const "$1" ;; esac - ],, PSI_INCLUDES) + ]) ]) diff --git a/m4/psi/psi_type.m4 b/m4/psi/psi_type.m4 index 6da73c5..ecd1548 100644 --- a/m4/psi/psi_type.m4 +++ b/m4/psi/psi_type.m4 @@ -1,6 +1,15 @@ psi_add_stdtype() { + if test "$2" != ""; then + local stdtype=" +#ifdef $2 + $1, +#endif +" + else + local stdtype=" $1," + fi PSI_STDTYPES="$PSI_STDTYPES - $1," +$stdtype" } # psi_type_pair(type, size) @@ -35,15 +44,19 @@ psi_type_pair() { AC_DEFUN(PSI_STDTYPE, [ ifdef(AS_TR_CPP(AC_TYPE_$1), AS_TR_CPP(AC_TYPE_$1)) - PSI_CHECK_SIZEOF($1) + PSI_CHECK_SIZEOF([$1], [ifelse([$1],bool,[ + #ifdef HAVE_STDBOOL_H + # include + #endif + ])]) if PSI_SH_TEST_SIZEOF($1); then m4_case(ifelse(,[$2],[$1],[$2]), - [bool],[psi_add_stdtype "{PSI_T_BOOL, \"bool\", NULL}"], + [bool],[psi_add_stdtype "{PSI_T_BOOL, \"bool\", NULL}" HAVE_BOOL], [float],[psi_add_stdtype "{PSI_T_FLOAT, \"float\", NULL}"], [double],[psi_add_stdtype "{PSI_T_DOUBLE, \"double\", NULL}"], - [long double],[psi_add_stdtype "{PSI_T_LONG_DOUBLE, \"long double\", NULL}"], + [long double],[psi_add_stdtype "{PSI_T_LONG_DOUBLE, \"long double\", NULL}" HAVE_LONG_DOUBLE], [ - AX_CHECK_SIGN($1, psi_basic_type=int, psi_basic_type=uint, PSI_INCLUDES) + AX_CHECK_SIGN($1, psi_basic_type=int, psi_basic_type=uint) AS_TR_SH(psi_basic_type_$1)=$psi_basic_type psi_add_stdtype "{`psi_type_pair $psi_basic_type PSI_SH_SIZEOF($1)`, \"$1\"}" ]) @@ -54,7 +67,6 @@ dnl PSI_CHECK_STD_TYPES() dnl Checks for standard ANSI-C, stdint and stdbool types. AC_DEFUN(PSI_CHECK_STD_TYPES, [ - AC_HEADER_STDBOOL PSI_CHECK_SIZEOF(void *) AC_CHECK_ALIGNOF(void *) @@ -66,8 +78,13 @@ AC_DEFUN(PSI_CHECK_STD_TYPES, [ PSI_STDTYPE(long double) AC_CHECK_ALIGNOF(long double) + AC_HEADER_STDBOOL PSI_STDTYPE(bool) - AC_CHECK_ALIGNOF(bool, PSI_INCLUDES) + AC_CHECK_ALIGNOF(bool,[ + #ifdef HAVE_STDBOOL_H + # include + #endif + ]) PSI_STDTYPE(char, int) AC_CHECK_ALIGNOF(char) diff --git a/php_psi_posix.h.in b/php_psi_posix.h.in deleted file mode 100644 index 080ed7a..0000000 --- a/php_psi_posix.h.in +++ /dev/null @@ -1,93 +0,0 @@ -/******************************************************************************* - Copyright (c) 2016, Michael Wallner . - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*******************************************************************************/ - -/* generated by configure */ - -#include "php_psi_stdinc.h" - -#ifdef PSI_STD_TYPES -static struct psi_std_type { - token_t type_tag; - const char *type_name; - const char *alias; -} psi_std_types[] = { -@PSI_STDTYPES@ - {0} -}; -#endif - -#ifdef PSI_PREDEF_CONSTS -static struct psi_predef_const { - token_t type_tag; - const char *type_name; - const char *var_name; - impl_val value; -} psi_predef_consts[] = { -@PSI_CONSTS@ - {0} -}; -#endif - -#ifdef PSI_FUNC_REDIRS -typedef void (*psi_func_ptr)(); -static struct psi_func_redir { - const char *name; - psi_func_ptr func; -} psi_func_redirs[] = { - /* inline byte swapping */ -#ifdef __APPLE__ - {"_OSSwapInt16", (psi_func_ptr) psi_swap16}, - {"_OSSwapInt32", (psi_func_ptr) psi_swap32}, - {"_OSSwapInt64", (psi_func_ptr) psi_swap64}, -#elif defined(__FreeBSD__) - {"bswap16", (psi_func_ptr) psi_swap16}, - {"bswap32", (psi_func_ptr) psi_swap32}, - {"bswap64", (psi_func_ptr) psi_swap64}, -#elif defined(__OpenBSD__) - {"swap16", (psi_func_ptr) psi_swap16}, - {"swap32", (psi_func_ptr) psi_swap32}, - {"swap64", psi_swap64}, -#elif defined(__NetBSD__) - {"bswap16", (psi_func_ptr) psi_swap16}, - {"bswap32", (psi_func_ptr) psi_swap32}, - {"bswap64", (psi_func_ptr) psi_swap64}, -#else - {"bswap_16", (psi_func_ptr) psi_swap16}, - {"bswap_32", (psi_func_ptr) psi_swap32}, - {"bswap_64", (psi_func_ptr) psi_swap64}, -#endif - /* needed from libc_nonshared.a */ - {"fstat", (psi_func_ptr) fstat}, - {"fstatat", (psi_func_ptr) fstatat}, - {"lstat", (psi_func_ptr) lstat}, - {"mknod", (psi_func_ptr) mknod}, -#ifdef HAVE_MKNODAT - {"mknodat", (psi_func_ptr) mknodat}, -#endif - {"stat", (psi_func_ptr) stat}, - {0} -}; -#endif - diff --git a/php_psi_predef.h.in b/php_psi_predef.h.in new file mode 100644 index 0000000..bdd7c79 --- /dev/null +++ b/php_psi_predef.h.in @@ -0,0 +1,91 @@ +/******************************************************************************* + Copyright (c) 2016, Michael Wallner . + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*******************************************************************************/ + +/* generated by configure */ + +#ifdef PSI_STD_TYPES +static struct psi_std_type { + token_t type_tag; + const char *type_name; + const char *alias; +} psi_std_types[] = { +@PSI_STDTYPES@ + {0} +}; +#endif + +#ifdef PSI_FUNC_REDIRS +typedef void (*psi_func_ptr)(void); +static struct psi_func_redir { + const char *name; + psi_func_ptr func; +} psi_func_redirs[] = { + /* inline byte swapping */ +#ifdef __APPLE__ + {"_OSSwapInt16", (psi_func_ptr) psi_swap16}, + {"_OSSwapInt32", (psi_func_ptr) psi_swap32}, + {"_OSSwapInt64", (psi_func_ptr) psi_swap64}, +#elif defined(__FreeBSD__) + {"bswap16", (psi_func_ptr) psi_swap16}, + {"bswap32", (psi_func_ptr) psi_swap32}, + {"bswap64", (psi_func_ptr) psi_swap64}, +#elif defined(__OpenBSD__) + {"swap16", (psi_func_ptr) psi_swap16}, + {"swap32", (psi_func_ptr) psi_swap32}, + {"swap64", psi_swap64}, +#elif defined(__NetBSD__) + {"bswap16", (psi_func_ptr) psi_swap16}, + {"bswap32", (psi_func_ptr) psi_swap32}, + {"bswap64", (psi_func_ptr) psi_swap64}, +#else + {"bswap_16", (psi_func_ptr) psi_swap16}, + {"bswap_32", (psi_func_ptr) psi_swap32}, + {"bswap_64", (psi_func_ptr) psi_swap64}, +#endif + /* needed from libc_nonshared.a */ + {"fstat", (psi_func_ptr) fstat}, + {"fstatat", (psi_func_ptr) fstatat}, + {"lstat", (psi_func_ptr) lstat}, + {"mknod", (psi_func_ptr) mknod}, +#ifdef HAVE_MKNODAT + {"mknodat", (psi_func_ptr) mknodat}, +#endif + {"stat", (psi_func_ptr) stat}, + {0} +}; +#endif + +#ifdef PSI_CPP_SEARCH +static const char psi_cpp_search[] = "" +@PSI_CPP_SEARCH@ +; +#endif + +#ifdef PSI_CPP_PREDEF +static const char psi_cpp_predef[] = "" +@PSI_CPP_PREDEF@ +; +#endif + diff --git a/scripts/_include.php b/scripts/_include.php index f918dab..f6604eb 100644 --- a/scripts/_include.php +++ b/scripts/_include.php @@ -66,7 +66,6 @@ function t_is_special($t) { OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************/ -#include "php_psi_stdinc.h" #include #include "token.h" \ No newline at end of file diff --git a/src/calc/basic.h b/src/calc/basic.h index 04660b5..bc35baf 100644 --- a/src/calc/basic.h +++ b/src/calc/basic.h @@ -23,7 +23,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************/ -#include "php_psi_stdinc.h" #include #include "token.h" diff --git a/src/context.c b/src/context.c index 4dcd920..ebe4e08 100644 --- a/src/context.c +++ b/src/context.c @@ -23,7 +23,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************/ -#include "php_psi_stdinc.h" +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include "php.h" @@ -61,8 +63,6 @@ #include "token.h" #include "parser.h" -#include "php_psi_posix.h" - PHP_MINIT_FUNCTION(psi_context) { unsigned flags = 0; diff --git a/src/cpp.c b/src/cpp.c index d703bda..49cf041 100644 --- a/src/cpp.c +++ b/src/cpp.c @@ -32,7 +32,7 @@ #define PSI_CPP_SEARCH #define PSI_CPP_PREDEF -#include "php_psi_cpp.h" +#include "php_psi_predef.h" #include "php_psi.h" diff --git a/src/data.h b/src/data.h index 29d452c..37658cc 100644 --- a/src/data.h +++ b/src/data.h @@ -98,7 +98,7 @@ union psi_dump_arg { void *hn; int fd; }; -typedef void (*psi_dump_cb)(union psi_dump_arg, const char *msg, ...); +typedef int (*psi_dump_cb)(union psi_dump_arg, const char *msg, ...); struct psi_dump { union psi_dump_arg ctx; psi_dump_cb fun; diff --git a/src/parser_proc.c b/src/parser_proc.c index 9861c54..986490e 100644 --- a/src/parser_proc.c +++ b/src/parser_proc.c @@ -9467,7 +9467,7 @@ static void psi_parser_proc_error(struct psi_parser *P, struct psi_plist *tokens psi_plist_get(tokens, last, &T); if (T) { - int i = (last >= 5) ? last - 5 : 0; + size_t i = (last >= 5) ? last - 5 : 0; P->error(PSI_DATA(P), T, PSI_WARNING, "PSI %s at col %u", msg, T->col); while (i <= last || T->type != PSI_T_EOS) { diff --git a/src/parser_proc_grammar.y b/src/parser_proc_grammar.y index c076abd..cd828e6 100644 --- a/src/parser_proc_grammar.y +++ b/src/parser_proc_grammar.y @@ -2321,7 +2321,7 @@ static void psi_parser_proc_error(struct psi_parser *P, struct psi_plist *tokens psi_plist_get(tokens, last, &T); if (T) { - int i = (last >= 5) ? last - 5 : 0; + size_t i = (last >= 5) ? last - 5 : 0; P->error(PSI_DATA(P), T, PSI_WARNING, "PSI %s at col %u", msg, T->col); while (i <= last || T->type != PSI_T_EOS) { diff --git a/src/parser_scan.c b/src/parser_scan.c index 24c8fc3..29f6a58 100644 --- a/src/parser_scan.c +++ b/src/parser_scan.c @@ -1,4 +1,4 @@ -/* Generated by re2c 1.1.1 on Sat Nov 24 09:32:55 2018 */ +/* Generated by re2c 1.1.1 on Mon Dec 3 16:17:20 2018 */ #line 1 "src/parser_scan.re" /******************************************************************************* Copyright (c) 2016, Michael Wallner . diff --git a/src/types/assert_stmt.c b/src/types/assert_stmt.c index 916c96e..6dbed60 100644 --- a/src/types/assert_stmt.c +++ b/src/types/assert_stmt.c @@ -23,8 +23,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************/ -#include "php_psi_stdinc.h" - #include "data.h" #include "calc.h"