瀏覽代碼

* implemented GetProcessId, defined TimeVal and TimeZone in addition to TTimeVal, TTimeZone, Makefile defaults to binutilsprefix i386-netware

armin 20 年之前
父節點
當前提交
8eb794231c
共有 4 個文件被更改,包括 24 次插入9 次删除
  1. 5 4
      rtl/netwlibc/Makefile
  2. 3 0
      rtl/netwlibc/Makefile.fpc
  3. 11 2
      rtl/netwlibc/libc.pp
  4. 5 3
      rtl/netwlibc/system.pp

+ 5 - 4
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
 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
 BSDs = freebsd netbsd openbsd darwin
 UNIXs = linux $(BSDs) sunos qnx
 UNIXs = linux $(BSDs) sunos qnx
-LIMIT83fs = go32v2 os2 emx watcom
+LIMIT83fs = go32v2 os2
 FORCE:
 FORCE:
 .PHONY: FORCE
 .PHONY: FORCE
 override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH)))
 override PATH:=$(patsubst %/,%,$(subst \,/,$(PATH)))
@@ -236,6 +236,7 @@ endif
 override FPCOPT+=-Ur
 override FPCOPT+=-Ur
 override FPCOPT+=-dMT -dDEBUG_MT
 override FPCOPT+=-dMT -dDEBUG_MT
 CREATESMART=0
 CREATESMART=0
+BINUTILSPREFIX=i386-netware-
 OBJPASDIR=$(RTL)/objpas
 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_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
 override TARGET_LOADERS+=nwplibc nwl_main nwl_dlle
@@ -577,7 +578,7 @@ HASSHAREDLIB=1
 ZIPSUFFIX=darwin
 ZIPSUFFIX=darwin
 endif
 endif
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
 ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
-FPCMADE=fpcmade.$(FPCMADEEXT)
+FPCMADE=fpcmade$(FPCMADEEXT)
 else
 else
 FPCMADE=fpcmade.$(FULL_TARGET)
 FPCMADE=fpcmade.$(FULL_TARGET)
 endif
 endif

+ 3 - 0
rtl/netwlibc/Makefile.fpc

@@ -69,6 +69,9 @@ override FPCOPT+=-dMT -dDEBUG_MT
 #CREATESMART=1
 #CREATESMART=1
 CREATESMART=0
 CREATESMART=0
 
 
+# always use i386-netware- as the prefix for binutils (they are the same for netware and netwlibc)
+BINUTILSPREFIX=i386-netware-
+
 # Paths
 # Paths
 OBJPASDIR=$(RTL)/objpas
 OBJPASDIR=$(RTL)/objpas
 
 

+ 11 - 2
rtl/netwlibc/libc.pp

@@ -1273,11 +1273,12 @@ type
      end;
      end;
 
 
    Ptimezone = ^Ttimezone;
    Ptimezone = ^Ttimezone;
-   Ttimezone = record                   { returned by gettimeofday() }
+   TTimezone = record                   { returned by gettimeofday() }
         tz_secondswest : time_t;        { seconds west of UTC }
         tz_secondswest : time_t;        { seconds west of UTC }
         tz_minuteswest : longint;       { minutes west of UTC (GMT) }
         tz_minuteswest : longint;       { minutes west of UTC (GMT) }
         tz_dsttime     : longint;       { nonzero if DST is ever in effect }
         tz_dsttime     : longint;       { nonzero if DST is ever in effect }
      end;
      end;
+   Timezone = TTimezone;
 
 
 {
 {
 ** Normally this functions fills struct tms with several time values. Most of
 ** Normally this functions fills struct tms with several time values. Most of
@@ -1296,6 +1297,7 @@ type
         tv_sec  : longint;
         tv_sec  : longint;
         tv_usec : longint;
         tv_usec : longint;
      end;
      end;
+   Timeval = TTimeval;
 
 
 (** unsupported pragma#pragma pack()*)
 (** unsupported pragma#pragma pack()*)
 { operations on struct timeval; note timercmp() does not work for >= or <=  }
 { 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 getnlmname(handle:pointer; name:Pchar):Pchar;cdecl;external libc_nlm name 'getnlmname';
 function getnlmloadpath(loadpath:Pchar):Pchar;cdecl;external libc_nlm name 'getnlmloadpath';
 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 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';
 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';
 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';
 function library_malloc(handle:pointer; size:size_t):pointer;cdecl;external libc_nlm name 'library_malloc';
@@ -9068,3 +9070,10 @@ end;
 
 
 end.
 end.
 {$endif}
 {$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
+
+}

+ 5 - 3
rtl/netwlibc/system.pp

@@ -1011,8 +1011,7 @@ end;
 
 
 function GetProcessID: SizeUInt;
 function GetProcessID: SizeUInt;
 begin
 begin
-{$WARNING GetProcessID implementation missing}
- GetProcessID := 1;
+ GetProcessID := SizeUInt (getnlmhandle);
 end;
 end;
 
 
 
 
@@ -1191,7 +1190,10 @@ Begin
 End.
 End.
 {
 {
   $Log$
   $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
     + GetProcessID added
 
 
   Revision 1.8  2004/11/25 12:38:17  armin
   Revision 1.8  2004/11/25 12:38:17  armin