From 8eb794231ca6e305e8f06c3d0bd22072efcc4443 Mon Sep 17 00:00:00 2001 From: armin Date: Tue, 7 Dec 2004 11:40:43 +0000 Subject: [PATCH] * implemented GetProcessId, defined TimeVal and TimeZone in addition to TTimeVal, TTimeZone, Makefile defaults to binutilsprefix i386-netware --- rtl/netwlibc/Makefile | 9 +++++---- rtl/netwlibc/Makefile.fpc | 3 +++ rtl/netwlibc/libc.pp | 13 +++++++++++-- rtl/netwlibc/system.pp | 8 +++++--- 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/rtl/netwlibc/Makefile b/rtl/netwlibc/Makefile index 0ac9a5b345..5465f12a6d 100644 --- a/rtl/netwlibc/Makefile +++ b/rtl/netwlibc/Makefile @@ -1,11 +1,11 @@ # -# Don't edit, this file is generated by FPCMake Version 1.1 [2004/12/05] +# Don't edit, this file is generated by FPCMake Version 1.1 [2004/11/26] # default: all -MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware openbsd wdosx palmos macos darwin emx watcom morphos netwlibc +MAKEFILETARGETS=netwlibc BSDs = freebsd netbsd openbsd darwin UNIXs = linux $(BSDs) sunos qnx -LIMIT83fs = go32v2 os2 emx watcom +LIMIT83fs = go32v2 os2 FORCE: .PHONY: FORCE override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH))) @@ -236,6 +236,7 @@ endif override FPCOPT+=-Ur override FPCOPT+=-dMT -dDEBUG_MT CREATESMART=0 +BINUTILSPREFIX=i386-netware- OBJPASDIR=$(RTL)/objpas override TARGET_UNITS+=$(SYSTEMUNIT) objpas macpas strings lineinfo winsock heaptrc matrix nwsnut libc dos crt objects sysconst dynlibs initc sysutils types typinfo systhrds classes cpu mmx getopts dateutils strutils convutils charset ucomplex variants rtlconst math varutils freebidi utf8bidi mouse video keyboard cmem sockets override TARGET_LOADERS+=nwplibc nwl_main nwl_dlle @@ -577,7 +578,7 @@ HASSHAREDLIB=1 ZIPSUFFIX=darwin endif ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),) -FPCMADE=fpcmade.$(FPCMADEEXT) +FPCMADE=fpcmade$(FPCMADEEXT) else FPCMADE=fpcmade.$(FULL_TARGET) endif diff --git a/rtl/netwlibc/Makefile.fpc b/rtl/netwlibc/Makefile.fpc index f92109508d..a317fa630e 100644 --- a/rtl/netwlibc/Makefile.fpc +++ b/rtl/netwlibc/Makefile.fpc @@ -69,6 +69,9 @@ override FPCOPT+=-dMT -dDEBUG_MT #CREATESMART=1 CREATESMART=0 +# always use i386-netware- as the prefix for binutils (they are the same for netware and netwlibc) +BINUTILSPREFIX=i386-netware- + # Paths OBJPASDIR=$(RTL)/objpas diff --git a/rtl/netwlibc/libc.pp b/rtl/netwlibc/libc.pp index 48dd50a904..9878aed22e 100644 --- a/rtl/netwlibc/libc.pp +++ b/rtl/netwlibc/libc.pp @@ -1273,11 +1273,12 @@ type end; Ptimezone = ^Ttimezone; - Ttimezone = record { returned by gettimeofday() } + TTimezone = record { returned by gettimeofday() } tz_secondswest : time_t; { seconds west of UTC } tz_minuteswest : longint; { minutes west of UTC (GMT) } tz_dsttime : longint; { nonzero if DST is ever in effect } end; + Timezone = TTimezone; { ** Normally this functions fills struct tms with several time values. Most of @@ -1296,6 +1297,7 @@ type tv_sec : longint; tv_usec : longint; end; + Timeval = TTimeval; (** unsupported pragma#pragma pack()*) { operations on struct timeval; note timercmp() does not work for >= or <= } @@ -7196,7 +7198,7 @@ function getnlmhandlefromthread(thread:pointer):pointer;cdecl;external libc_nlm function getnlmname(handle:pointer; name:Pchar):Pchar;cdecl;external libc_nlm name 'getnlmname'; function getnlmloadpath(loadpath:Pchar):Pchar;cdecl;external libc_nlm name 'getnlmloadpath'; function getthreadname(threadid:pointer; name:Pchar; maxlen:size_t):longint;cdecl;external libc_nlm name 'getthreadname'; -function getthreadid:pointer;cdecl;external libc_nlm name 'getthreadid'; +function _getthreadid:pointer;cdecl;external libc_nlm name 'getthreadid'; function library_calloc(handle:pointer; size:size_t; count:size_t):pointer;cdecl;external libc_nlm name 'library_calloc'; procedure library_free(addr:pointer);cdecl;external libc_nlm name 'library_free'; function library_malloc(handle:pointer; size:size_t):pointer;cdecl;external libc_nlm name 'library_malloc'; @@ -9068,3 +9070,10 @@ end; end. {$endif} + +{ + $Log$ + Revision 1.5 2004-12-07 11:40:43 armin + * implemented GetProcessId, defined TimeVal and TimeZone in addition to TTimeVal, TTimeZone, Makefile defaults to binutilsprefix i386-netware + +} diff --git a/rtl/netwlibc/system.pp b/rtl/netwlibc/system.pp index db6ad6f4e0..ccde9bef4c 100644 --- a/rtl/netwlibc/system.pp +++ b/rtl/netwlibc/system.pp @@ -1011,8 +1011,7 @@ end; function GetProcessID: SizeUInt; begin -{$WARNING GetProcessID implementation missing} - GetProcessID := 1; + GetProcessID := SizeUInt (getnlmhandle); end; @@ -1191,7 +1190,10 @@ Begin End. { $Log$ - Revision 1.9 2004-12-05 14:36:38 hajny + 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 + + Revision 1.9 2004/12/05 14:36:38 hajny + GetProcessID added Revision 1.8 2004/11/25 12:38:17 armin