Skip to content

Commit

Permalink
Fixed #8896 (Add the flag "u" in regular expressions) #2
Browse files Browse the repository at this point in the history
  • Loading branch information
ccw808 committed Jun 25, 2015
1 parent 738e174 commit a9781f2
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 12 deletions.
9 changes: 9 additions & 0 deletions MTA10_Server/mods/deathmatch/logic/CGame.cpp
Expand Up @@ -530,6 +530,15 @@ bool CGame::Start ( int iArgumentCount, char* szArguments [] )
return false;
}

// Check pcre has been built correctly
int iPcreConfigUtf8 = 0;
pcre_config( PCRE_CONFIG_UTF8, &iPcreConfigUtf8 );
if ( iPcreConfigUtf8 == 0 )
{
CLogger::ErrorPrintf( "PCRE built without UTF8 support\n" );
return false;
}

// Grab the path to the main config
SString strBuffer;
const char* szMainConfig;
Expand Down
27 changes: 16 additions & 11 deletions initial-install.sh
Expand Up @@ -13,17 +13,16 @@ autoreconf -fiv

# then look at the configure options:
# ./configure --help

# on a 64bit system, while there's no 64bit net.so
# and probably some unknown issues you should compile and link
# 32bit objects like so:
#export PKG_CONFIG_PATH=/usr/lib32/pkgconfig
#./configure LDFLAGS="-m32" CPPFLAGS="-m32" CFLAGS="-m32" CXXFLAGS="-m32" --enable-silent-rules $@

if [ $1 = "-g" ]; then
./configure CFLAGS='-g -O2 -fPIC -DPIC -Wno-uninitialized' CXXFLAGS='-g -O2 -fPIC -DPIC -Wno-uninitialized' CPPFLAGS='-g -O2 -fPIC -DPIC -Wno-uninitialized' --with-pic --disable-system-pcre
./configure --with-pic --disable-system-pcre --enable-utf8 \
CFLAGS='-g -O2 -fPIC -DPIC' \
CXXFLAGS='-g -O2 -fPIC -DPIC -std=gnu++0x' \
CPPFLAGS='-g -O2 -fPIC -DPIC'
else
./configure CFLAGS='-O2 -fPIC -DPIC -Wno-uninitialized' CXXFLAGS='-O2 -fPIC -DPIC -Wno-uninitialized' CPPFLAGS='-O2 -fPIC -DPIC -Wno-uninitialized' --with-pic --disable-system-pcre
./configure --with-pic --disable-system-pcre --enable-utf8 \
CFLAGS='-O2 -fPIC -DPIC' \
CXXFLAGS='-O2 -fPIC -DPIC -std=gnu++0x' \
CPPFLAGS='-O2 -fPIC -DPIC'
fi

# Remove previous build files #2
Expand All @@ -43,8 +42,14 @@ cd ../..
# then you have makefiles and the source can be compiled :)
# building in parallel mode (use -j<JOBS>)
if [ $1 = "-g" ]; then
make CFLAGS='-g -O2 -fPIC -DPIC -Wno-uninitialized' CXXFLAGS='-g -O2 -fPIC -DPIC -Wno-uninitialized' CPPFLAGS='-g -O2 -fPIC -DPIC -Wno-uninitialized' >_make.log
make \
CFLAGS='-g -O2 -fPIC -DPIC -Wno-uninitialized' \
CXXFLAGS='-g -O2 -fPIC -DPIC -Wno-uninitialized -std=gnu++0x' \
CPPFLAGS='-g -O2 -fPIC -DPIC -Wno-uninitialized' >_make.log
else
make CFLAGS='-O2 -fPIC -DPIC -Wno-uninitialized' CXXFLAGS='-O2 -fPIC -DPIC -Wno-uninitialized' CPPFLAGS='-O2 -fPIC -DPIC -Wno-uninitialized' >_make.log
make \
CFLAGS='-O2 -fPIC -DPIC -Wno-uninitialized' \
CXXFLAGS='-O2 -fPIC -DPIC -Wno-uninitialized -std=gnu++0x' \
CPPFLAGS='-O2 -fPIC -DPIC -Wno-uninitialized' >_make.log
fi

2 changes: 1 addition & 1 deletion vendor/pcre/shipped_for_mta_win32/config.h
Expand Up @@ -300,7 +300,7 @@ them both to 0; an emulation function will be used. */
even in an EBCDIC environment, but it is incompatible with the EBCDIC
macro. That is, PCRE can support *either* EBCDIC code *or* ASCII/UTF-8, but
not both at once. */
/* #undef SUPPORT_UTF8 */
#define SUPPORT_UTF8

/* Version number of package */
#ifndef VERSION
Expand Down

0 comments on commit a9781f2

Please sign in to comment.