|
@@ -97,12 +97,12 @@ procedure NWSysSetThreadFunctions (atv:TSysReleaseThreadVars;
|
|
stdata:TSysSetThreadDataAreaPtr);
|
|
stdata:TSysSetThreadDataAreaPtr);
|
|
|
|
|
|
|
|
|
|
-procedure ConsolePrintf (s :shortstring);
|
|
|
|
-procedure ConsolePrintf (FormatStr : PCHAR; Param : LONGINT);
|
|
|
|
-procedure ConsolePrintf (FormatStr : PCHAR; Param : pchar);
|
|
|
|
-procedure ConsolePrintf (FormatStr : PCHAR; P1,P2 : LONGINT);
|
|
|
|
-procedure ConsolePrintf (FormatStr : PCHAR; P1,P2,P3 : LONGINT);
|
|
|
|
-procedure ConsolePrintf (FormatStr : PCHAR);
|
|
|
|
|
|
+procedure _ConsolePrintf (s :shortstring);
|
|
|
|
+procedure _ConsolePrintf (FormatStr : PCHAR; Param : LONGINT);
|
|
|
|
+procedure _ConsolePrintf (FormatStr : PCHAR; Param : pchar);
|
|
|
|
+procedure _ConsolePrintf (FormatStr : PCHAR; P1,P2 : LONGINT);
|
|
|
|
+procedure _ConsolePrintf (FormatStr : PCHAR; P1,P2,P3 : LONGINT);
|
|
|
|
+procedure _ConsolePrintf (FormatStr : PCHAR);
|
|
procedure __EnterDebugger;cdecl;external '!netware' name 'EnterDebugger';
|
|
procedure __EnterDebugger;cdecl;external '!netware' name 'EnterDebugger';
|
|
|
|
|
|
function NWGetCodeStart : pointer; // needed for Lineinfo
|
|
function NWGetCodeStart : pointer; // needed for Lineinfo
|
|
@@ -165,7 +165,7 @@ begin
|
|
if TerminatingThreadID <> dword(pthread_self) then
|
|
if TerminatingThreadID <> dword(pthread_self) then
|
|
begin
|
|
begin
|
|
{$ifdef DEBUG_MT}
|
|
{$ifdef DEBUG_MT}
|
|
- ConsolePrintf ('Terminating Thread %x because halt was called while Thread %x terminates nlm'#13#10,dword(pthread_self),TerminatingThreadId);
|
|
|
|
|
|
+ _ConsolePrintf ('Terminating Thread %x because halt was called while Thread %x terminates nlm'#13#10,dword(pthread_self),TerminatingThreadId);
|
|
{$endif}
|
|
{$endif}
|
|
pthread_exit (nil);
|
|
pthread_exit (nil);
|
|
// only for the case ExitThread fails
|
|
// only for the case ExitThread fails
|
|
@@ -269,7 +269,7 @@ var P2 : POINTER;
|
|
begin
|
|
begin
|
|
if HeapSbrkReleased then
|
|
if HeapSbrkReleased then
|
|
begin
|
|
begin
|
|
- ConsolePrintf ('Error: SysOSFree called after all heap memory was released'#13#10);
|
|
|
|
|
|
+ _ConsolePrintf ('Error: SysOSFree called after all heap memory was released'#13#10);
|
|
exit(nil);
|
|
exit(nil);
|
|
end;
|
|
end;
|
|
SysOSAlloc := _Alloc (size,HeapAllocResourceTag);
|
|
SysOSAlloc := _Alloc (size,HeapAllocResourceTag);
|
|
@@ -341,7 +341,7 @@ var i : longint;
|
|
begin
|
|
begin
|
|
if HeapSbrkReleased then
|
|
if HeapSbrkReleased then
|
|
begin
|
|
begin
|
|
- ConsolePrintf ('Error: SysOSFree called after all heap memory was released'#13#10);
|
|
|
|
|
|
+ _ConsolePrintf ('Error: SysOSFree called after all heap memory was released'#13#10);
|
|
end else
|
|
end else
|
|
if (HeapSbrkLastUsed > 0) then
|
|
if (HeapSbrkLastUsed > 0) then
|
|
for i := 1 to HeapSbrkLastUsed do
|
|
for i := 1 to HeapSbrkLastUsed do
|
|
@@ -867,7 +867,7 @@ procedure InitFPU;assembler;
|
|
function CheckFunction : longint; CDECL; [public,alias: '_NonAppCheckUnload'];
|
|
function CheckFunction : longint; CDECL; [public,alias: '_NonAppCheckUnload'];
|
|
var oldPtr : pointer;
|
|
var oldPtr : pointer;
|
|
begin
|
|
begin
|
|
- //ConsolePrintf ('CheckFunction'#13#10);
|
|
|
|
|
|
+ //_ConsolePrintf ('CheckFunction'#13#10);
|
|
if assigned (NetwareCheckFunction) then
|
|
if assigned (NetwareCheckFunction) then
|
|
begin
|
|
begin
|
|
if assigned (SetThreadDataAreaPtr) then
|
|
if assigned (SetThreadDataAreaPtr) then
|
|
@@ -884,15 +884,15 @@ begin
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
-procedure ConsolePrintf (s : shortstring);
|
|
|
|
|
|
+procedure _ConsolePrintf (s : shortstring);
|
|
begin
|
|
begin
|
|
if length(s) > 254 then
|
|
if length(s) > 254 then
|
|
byte(s[0]) := 254;
|
|
byte(s[0]) := 254;
|
|
s := s + #0;
|
|
s := s + #0;
|
|
- ConsolePrintf (@s[1]);
|
|
|
|
|
|
+ _ConsolePrintf (@s[1]);
|
|
end;
|
|
end;
|
|
|
|
|
|
-procedure ConsolePrintf (FormatStr : PCHAR);
|
|
|
|
|
|
+procedure _ConsolePrintf (FormatStr : PCHAR);
|
|
begin
|
|
begin
|
|
if NWLoggerScreen = nil then
|
|
if NWLoggerScreen = nil then
|
|
NWLoggerScreen := getnetwarelogger;
|
|
NWLoggerScreen := getnetwarelogger;
|
|
@@ -900,7 +900,7 @@ begin
|
|
screenprintf (NWLoggerScreen,FormatStr);
|
|
screenprintf (NWLoggerScreen,FormatStr);
|
|
end;
|
|
end;
|
|
|
|
|
|
-procedure ConsolePrintf (FormatStr : PCHAR; Param : LONGINT);
|
|
|
|
|
|
+procedure _ConsolePrintf (FormatStr : PCHAR; Param : LONGINT);
|
|
begin
|
|
begin
|
|
if NWLoggerScreen = nil then
|
|
if NWLoggerScreen = nil then
|
|
NWLoggerScreen := getnetwarelogger;
|
|
NWLoggerScreen := getnetwarelogger;
|
|
@@ -908,12 +908,12 @@ begin
|
|
screenprintf (NWLoggerScreen,FormatStr,Param);
|
|
screenprintf (NWLoggerScreen,FormatStr,Param);
|
|
end;
|
|
end;
|
|
|
|
|
|
-procedure ConsolePrintf (FormatStr : PCHAR; Param : pchar);
|
|
|
|
|
|
+procedure _ConsolePrintf (FormatStr : PCHAR; Param : pchar);
|
|
begin
|
|
begin
|
|
- ConsolePrintf (FormatStr,longint(Param));
|
|
|
|
|
|
+ _ConsolePrintf (FormatStr,longint(Param));
|
|
end;
|
|
end;
|
|
|
|
|
|
-procedure ConsolePrintf (FormatStr : PCHAR; P1,P2 : LONGINT);
|
|
|
|
|
|
+procedure _ConsolePrintf (FormatStr : PCHAR; P1,P2 : LONGINT);
|
|
begin
|
|
begin
|
|
if NWLoggerScreen = nil then
|
|
if NWLoggerScreen = nil then
|
|
NWLoggerScreen := getnetwarelogger;
|
|
NWLoggerScreen := getnetwarelogger;
|
|
@@ -921,7 +921,7 @@ begin
|
|
screenprintf (NWLoggerScreen,FormatStr,P1,P2);
|
|
screenprintf (NWLoggerScreen,FormatStr,P1,P2);
|
|
end;
|
|
end;
|
|
|
|
|
|
-procedure ConsolePrintf (FormatStr : PCHAR; P1,P2,P3 : LONGINT);
|
|
|
|
|
|
+procedure _ConsolePrintf (FormatStr : PCHAR; P1,P2,P3 : LONGINT);
|
|
begin
|
|
begin
|
|
if NWLoggerScreen = nil then
|
|
if NWLoggerScreen = nil then
|
|
NWLoggerScreen := getnetwarelogger;
|
|
NWLoggerScreen := getnetwarelogger;
|
|
@@ -1098,14 +1098,14 @@ function _DLLMain (hInstDLL:pointer; fdwReason:dword; DLLParam:longint):longbool
|
|
var res : longbool;
|
|
var res : longbool;
|
|
begin
|
|
begin
|
|
{$ifdef DEBUG_MT}
|
|
{$ifdef DEBUG_MT}
|
|
- ConsolePrintf ('_FPC_DLL_Entry called');
|
|
|
|
|
|
+ _ConsolePrintf ('_FPC_DLL_Entry called');
|
|
{$endif}
|
|
{$endif}
|
|
_DLLMain := false;
|
|
_DLLMain := false;
|
|
isLibrary := true;
|
|
isLibrary := true;
|
|
case fdwReason of
|
|
case fdwReason of
|
|
DLL_ACTUAL_DLLMAIN : _DLLMain := true;
|
|
DLL_ACTUAL_DLLMAIN : _DLLMain := true;
|
|
DLL_NLM_STARTUP : begin
|
|
DLL_NLM_STARTUP : begin
|
|
- //__ConsolePrintf ('DLL_NLM_STARTUP');
|
|
|
|
|
|
+ //_ConsolePrintf ('DLL_NLM_STARTUP');
|
|
if assigned(Dll_Process_Attach_Hook) then
|
|
if assigned(Dll_Process_Attach_Hook) then
|
|
begin
|
|
begin
|
|
res:=Dll_Process_Attach_Hook(DllParam);
|
|
res:=Dll_Process_Attach_Hook(DllParam);
|
|
@@ -1116,7 +1116,7 @@ begin
|
|
_DLLMain := true;
|
|
_DLLMain := true;
|
|
end;
|
|
end;
|
|
DLL_NLM_SHUTDOWN : begin
|
|
DLL_NLM_SHUTDOWN : begin
|
|
- //__ConsolePrintf ('DLL_NLM_SHUTDOWN');
|
|
|
|
|
|
+ //_ConsolePrintf ('DLL_NLM_SHUTDOWN');
|
|
TermSigHandler(0);
|
|
TermSigHandler(0);
|
|
_DLLMain := true;
|
|
_DLLMain := true;
|
|
end;
|
|
end;
|
|
@@ -1190,7 +1190,10 @@ Begin
|
|
End.
|
|
End.
|
|
{
|
|
{
|
|
$Log$
|
|
$Log$
|
|
- Revision 1.10 2004-12-07 11:40:43 armin
|
|
|
|
|
|
+ Revision 1.11 2005-01-04 11:25:34 armin
|
|
|
|
+ * rtl code cleanup, compat fixes between clib and libc
|
|
|
|
+
|
|
|
|
+ Revision 1.10 2004/12/07 11:40:43 armin
|
|
* implemented GetProcessId, defined TimeVal and TimeZone in addition to TTimeVal, TTimeZone, Makefile defaults to binutilsprefix i386-netware
|
|
* implemented GetProcessId, defined TimeVal and TimeZone in addition to TTimeVal, TTimeZone, Makefile defaults to binutilsprefix i386-netware
|
|
|
|
|
|
Revision 1.9 2004/12/05 14:36:38 hajny
|
|
Revision 1.9 2004/12/05 14:36:38 hajny
|