summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
170e475)
* add makefile option to build test app without lmessages
* fixup lcore building on various older versions of freepascal
git-svn-id: file:///svnroot/lcore/trunk@35
b1de8a11-f9be-4011-bde0-
cc7ace90066a
+nomessages:\r
+ fpc -Sd -gl -dipv6 -dnomessages lcoretest.dpr\r
+\r
lcoretest: *.pas *.inc lcoretest.dpr\r
fpc -Sd -gl -dipv6 lcoretest.dpr\r
\r
lcoretest: *.pas *.inc lcoretest.dpr\r
fpc -Sd -gl -dipv6 lcoretest.dpr\r
\r
{$ifdef ver1_0}\r
cuint16=word;\r
cuint32=dword;\r
sa_family_t=word;\r
{$ifdef ver1_0}\r
cuint16=word;\r
cuint32=dword;\r
sa_family_t=word;\r
+\r TInetSockAddr6 = packed record\r
+ sin6_family: word;\r
+ sin6_port: word;\r
+ sin6_flowinfo: uint32;\r
+ sin6_addr: tin6_addr;\r
+ sin6_scope_id: uint32;\r
+ end;\r
{$endif}\r
{$endif}\r
TinetSockAddrv = packed record\r
{$endif}\r
{$endif}\r
TinetSockAddrv = packed record\r
\r
const\r
biniplist_prefix='bipl'#0;\r
\r
const\r
biniplist_prefix='bipl'#0;\r
- biniplist_prefixlen=length(biniplist_prefix);\r
-\r
+ //fpc 1.0.x doesn't seem to like use of length function in a constant \r
+ //definition\r
+ //biniplist_prefixlen=length(biniplist_prefix);\r
+\r biniplist_prefixlen=5;\r
+ \r
function biniplist_new:tbiniplist;\r
begin\r
result := biniplist_prefix;\r
function biniplist_new:tbiniplist;\r
begin\r
result := biniplist_prefix;\r
{$ifndef nolcorernd}\r
uses\r
{$ifdef win32}windows,activex,{$endif}\r
{$ifndef nolcorernd}\r
uses\r
{$ifdef win32}windows,activex,{$endif}\r
- {$ifdef unix}baseunix,unix,unixutil,{$endif}\r
+ {$ifdef unix}\r
+ {$ifdef ver1_0}\r
+ linux,\r
+ {$else}\r
+ baseunix,unix,unixutil,\r
+ {$endif}\r
+ {$endif}\r
fastmd5,sysutils;\r
\r
{$ifdef unix}{$include unixstuff.inc}{$endif}\r
fastmd5,sysutils;\r
\r
{$ifdef unix}{$include unixstuff.inc}{$endif}\r
//include it to check if it compiles ok ;)\r
{$ifndef win32}\r
,\r
//include it to check if it compiles ok ;)\r
{$ifndef win32}\r
,\r
+ {$ifndef nomessages}\r
+ lmessages,\r
+ {$endif}\r
unitfork\r
{$endif}\r
;\r
unitfork\r
{$endif}\r
;\r
\r
uses pgtypes,sysutils,bsearchtree,strings,syncobjs;\r
\r
\r
uses pgtypes,sysutils,bsearchtree,strings,syncobjs;\r
\r
+\r
+{$if (fpc_version < 2) or ((fpc_version=2) and ((fpc_release < 2) or ((fpc_release = 2) and (fpc_patch < 2)) ))}\r
+ {$error this code is only supported under fpc 2.2.2 and above due to bugs in the eventobject code in older versions}\r
+{$endif}\r
+\r
type\r
lparam=taddrint;\r
wparam=taddrint;\r
type\r
lparam=taddrint;\r
wparam=taddrint;\r
linux.dup(original,result);\r
end;\r
{$define gettimeofdaysec := gettimeofday}\r
linux.dup(original,result);\r
end;\r
{$define gettimeofdaysec := gettimeofday}\r
+ const\r
+ IPPROTO_UDP=17;\r
+ IPPROTO_ICMP=1;\r
+ function ntohs(invalue:word):word;inline;\r
+ var\r
+ invaluebytes : array[0..1] of byte absolute invalue;\r
+ resultbytes : array[0..1] of byte absolute result;\r
+ begin\r
+ {$ifdef endian_little}\r
+ resultbytes[0] := invaluebytes[1];\r
+ resultbytes[1] := invaluebytes[0];\r
+ {$else}\r
+ result := invalue;\r
+ {$endif}\r
+ end; \r
{$else}\r
\r
{$define sigprocmask := fpsigprocmask}\r
{$else}\r
\r
{$define sigprocmask := fpsigprocmask}\r
end;\r
{$endif}\r
{$endif}\r
end;\r
{$endif}\r
{$endif}\r
+ {$ifdef ver2_0}\r
+ const\r
+ IPPROTO_UDP=17;\r
+ IPPROTO_ICMP=1;\r
+ {$endif}\r
+ {$ifdef ver1_9}\r
+ const\r
+ IPPROTO_UDP=17;\r
+ IPPROTO_ICMP=1;\r
+ function ntohs(invalue:word):word;inline;\r
+ var\r
+ invaluebytes : array[0..1] of byte absolute invalue;\r
+ resultbytes : array[0..1] of byte absolute result;\r
+ begin\r
+ {$ifdef endian_little}\r
+ resultbytes[0] := invaluebytes[1];\r
+ resultbytes[1] := invaluebytes[0];\r
+ {$else}\r
+ result := invalue;\r
+ {$endif}\r
+ end;\r
+ {$endif}\r
procedure gettimeofday(var tv:ttimeval);inline;\r
begin\r
fpgettimeofday(@tv,nil); \r
procedure gettimeofday(var tv:ttimeval);inline;\r
begin\r
fpgettimeofday(@tv,nil); \r