From 1899892a174d284febe38f0d93f62fcfe60285c0 Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Thu, 10 Dec 2009 15:00:22 +0000 Subject: correct library name and enable type definition for Mac OS X git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2016 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/lib/pcre/pcre.pas | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/lib/pcre/pcre.pas b/src/lib/pcre/pcre.pas index 87c2fc65..99411830 100644 --- a/src/lib/pcre/pcre.pas +++ b/src/lib/pcre/pcre.pas @@ -56,6 +56,12 @@ interface {$WEAKPACKAGEUNIT ON} +// (p3) this is the switch to change between static and dynamic linking. +// It is set to dynamic by default. To disable simply insert a '.' before the '$' +// +// NOTE: if you enable static linking of DLL, this means that the pcre.dll *must* +// be in the users path or an AV will occur at startup + (*$HPPEMIT '#include "pcre.h"'*) const @@ -256,11 +262,12 @@ const type {$IFNDEF FPC} + {$IFDEF CPU32} + SizeInt = Integer; + {$ENDIF CPU32} {$IFDEF CPU64} SizeInt = Int64; - {$ELSE ~CPU64} - SizeInt = Integer; - {$ENDIF ~CPU64} + {$ENDIF CPU64} PPAnsiChar = ^PAnsiChar; {$ENDIF ~FPC} PPPAnsiChar = ^PPAnsiChar; @@ -524,14 +531,20 @@ type {$IFDEF LINUX} TModuleHandle = Pointer; {$ENDIF LINUX} + {$IFDEF DARWIN} + TModuleHandle = Pointer; + {$ENDIF DARWIN} const {$IFDEF MSWINDOWS} libpcremodulename = 'pcre3.dll'; {$ENDIF MSWINDOWS} - {$IFDEF UNIX} + {$IFDEF LINUX} libpcremodulename = 'libpcre.so.0'; - {$ENDIF UNIX} + {$ENDIF LINUX} + {$IFDEF DARWIN} + libpcremodulename = 'libpcre.dylib'; + {$ENDIF DARWIN} PCRECompileExportName = 'pcre_compile'; PCRECompile2ExportName = 'pcre_compile2'; PCREConfigExportName = 'pcre_config'; -- cgit v1.2.3