Browse Source

--- Merging r14320 into '.':
U rtl/win/winsock2.pp
--- Merging r14325 into '.':
U rtl/inc/variants.pp
--- Merging r14333 into '.':
U rtl/darwin/ptypes.inc
--- Merging r14334 into '.':
U rtl/bsd/ostypes.inc
--- Merging r14339 into '.':
U rtl/inc/system.inc
U rtl/inc/systemh.inc
--- Merging r14348 into '.':
U rtl/solaris/termios.inc
U rtl/solaris/termiosproc.inc
--- Merging r14352 into '.':
U rtl/unix/cwstring.pp
--- Merging r14355 into '.':
G rtl/unix/cwstring.pp
--- Merging r14415 into '.':
U packages/fcl-process/src/unix/simpleipc.inc
--- Merging r14416 into '.':
U packages/openal/examples/Makefile.fpc
A packages/openal/examples/captureplaybackopenal.pas
C packages/openal/examples/Makefile
--- Merging r14441 into '.':
U packages/fcl-db/src/sqlite/customsqliteds.pas
--- Merging r14459 into '.':
U rtl/win/crt.pp
--- Merging r14463 into '.':
U packages/fcl-web/src/fphtml.pp
--- Merging r14469 into '.':
U packages/iconvenc/src/iconvert.inc
--- Merging r14472 into '.':
G rtl/inc/variants.pp
A tests/webtbs/tw15296.pp
Summary of conflicts:
Text conflicts: 1

# revisions: r14320,14325,14333,14334,14339,14348,14352,14355,14415,14416,14441,14459,14463,14469,14472
------------------------------------------------------------------------
r14320 | marco | 2009-12-04 09:37:18 +0100 (Fri, 04 Dec 2009) | 2 lines
Changed paths:
M /trunk/rtl/win/winsock2.pp

* group type to u_long as per mantis 15241

------------------------------------------------------------------------
------------------------------------------------------------------------
r14325 | paul | 2009-12-04 15:57:17 +0100 (Fri, 04 Dec 2009) | 1 line
Changed paths:
M /trunk/rtl/inc/variants.pp

rtl: DoVarCopyComplex should copy variant strings by ref (reason: this is delphi compatible behavior)
------------------------------------------------------------------------
------------------------------------------------------------------------
r14333 | jonas | 2009-12-05 11:51:48 +0100 (Sat, 05 Dec 2009) | 4 lines
Changed paths:
M /trunk/rtl/darwin/ptypes.inc

+ added new tstatfs structure available on Mac OS X 10.6, which appears to
be the only one that's supported on iPhonsOS (fixes webtbs/tw1041 on
iPhoneOS)

------------------------------------------------------------------------
------------------------------------------------------------------------
r14334 | jonas | 2009-12-05 12:29:59 +0100 (Sat, 05 Dec 2009) | 3 lines
Changed paths:
M /trunk/rtl/bsd/ostypes.inc

* dirent structure available on 10.6 and iPhoneOS
* added some missing private fields to "dir" type for all Darwin platforms

------------------------------------------------------------------------
------------------------------------------------------------------------
r14339 | jonas | 2009-12-06 11:02:05 +0100 (Sun, 06 Dec 2009) | 3 lines
Changed paths:
M /trunk/rtl/inc/system.inc
M /trunk/rtl/inc/systemh.inc

* changed errnum parameter of halt() from byte to longint to match the
definition of exitcode (mantis #15231)

------------------------------------------------------------------------
------------------------------------------------------------------------
r14348 | pierre | 2009-12-07 12:07:55 +0100 (Mon, 07 Dec 2009) | 1 line
Changed paths:
M /trunk/rtl/solaris/termios.inc
M /trunk/rtl/solaris/termiosproc.inc

* fix problem with tcsetattr overloadwith const parameter
------------------------------------------------------------------------
------------------------------------------------------------------------
r14352 | pierre | 2009-12-07 17:57:12 +0100 (Mon, 07 Dec 2009) | 1 line
Changed paths:
M /trunk/rtl/unix/cwstring.pp

* Use default functions if call to iconv_open failed
------------------------------------------------------------------------
------------------------------------------------------------------------
r14355 | florian | 2009-12-07 21:16:31 +0100 (Mon, 07 Dec 2009) | 2 lines
Changed paths:
M /trunk/rtl/unix/cwstring.pp

* fixes bootstrapping with 2.2.x

------------------------------------------------------------------------
------------------------------------------------------------------------
r14415 | marco | 2009-12-11 23:33:10 +0100 (Fri, 11 Dec 2009) | 4 lines
Changed paths:
M /trunk/packages/fcl-process/src/unix/simpleipc.inc

* Mantis ipcserver problem solved caused by the adding of locking in the rtl
(mantis 15219)


------------------------------------------------------------------------
------------------------------------------------------------------------
r14416 | marco | 2009-12-11 23:40:43 +0100 (Fri, 11 Dec 2009) | 2 lines
Changed paths:
M /trunk/packages/openal/examples/Makefile
M /trunk/packages/openal/examples/Makefile.fpc
A /trunk/packages/openal/examples/captureplaybackopenal.pas

* OpenAL example from Mantis 15306 by Craig Chapman.

------------------------------------------------------------------------
------------------------------------------------------------------------
r14441 | blikblum | 2009-12-14 19:24:17 +0100 (Mon, 14 Dec 2009) | 1 line
Changed paths:
M /trunk/packages/fcl-db/src/sqlite/customsqliteds.pas

* Ensure value 1 is stored for True boolean values (fpc > 2.2 stores -1 in a wordbool when assigned a True boolean value)
------------------------------------------------------------------------
------------------------------------------------------------------------
r14459 | florian | 2009-12-21 10:59:04 +0100 (Mon, 21 Dec 2009) | 1 line
Changed paths:
M /trunk/rtl/win/crt.pp

* win crt unit returns #13 for numeric enter as well, resolves #13203
------------------------------------------------------------------------
------------------------------------------------------------------------
r14463 | joost | 2009-12-22 22:18:32 +0100 (Tue, 22 Dec 2009) | 1 line
Changed paths:
M /trunk/packages/fcl-web/src/fphtml.pp

* THtmlSelectProducer.jsOnChange property
------------------------------------------------------------------------
------------------------------------------------------------------------
r14469 | jonas | 2009-12-23 22:06:52 +0100 (Wed, 23 Dec 2009) | 2 lines
Changed paths:
M /trunk/packages/iconvenc/src/iconvert.inc

* fixed compilation with range checking enabled

------------------------------------------------------------------------
------------------------------------------------------------------------
r14472 | jonas | 2009-12-23 22:30:58 +0100 (Wed, 23 Dec 2009) | 8 lines
Changed paths:
M /trunk/rtl/inc/variants.pp
A /trunk/tests/webtbs/tw15296.pp

* disabled the use of samevalue() when comparing float variants, because
a) it's Delphi-incompatible
b) when a tdatetime property is obtained via GetPropValue(), then
it will be a varfloat rather than a vardate, and there full
precision certainly is required (mantis #15296)
- since DoVarCmpFloat() is now identical to DoVarCmpDate(), removed
DoVarCmpFloat

------------------------------------------------------------------------

git-svn-id: branches/fixes_2_4@14709 -

marco 15 years ago
parent
commit
0f5d0b5dde

+ 2 - 0
.gitattributes

@@ -3972,6 +3972,7 @@ packages/openal/Makefile svneol=native#text/plain
 packages/openal/Makefile.fpc svneol=native#text/plain
 packages/openal/Makefile.fpc svneol=native#text/plain
 packages/openal/examples/Makefile svneol=native#text/plain
 packages/openal/examples/Makefile svneol=native#text/plain
 packages/openal/examples/Makefile.fpc svneol=native#text/plain
 packages/openal/examples/Makefile.fpc svneol=native#text/plain
+packages/openal/examples/captureplaybackopenal.pas svneol=native#text/plain
 packages/openal/examples/madopenal.pas svneol=native#text/plain
 packages/openal/examples/madopenal.pas svneol=native#text/plain
 packages/openal/fpmake.pp svneol=native#text/plain
 packages/openal/fpmake.pp svneol=native#text/plain
 packages/openal/src/alch.inc svneol=native#text/plain
 packages/openal/src/alch.inc svneol=native#text/plain
@@ -9397,6 +9398,7 @@ tests/webtbs/tw1489.pp svneol=native#text/plain
 tests/webtbs/tw14958a.pp svneol=native#text/plain
 tests/webtbs/tw14958a.pp svneol=native#text/plain
 tests/webtbs/tw14958b.pp svneol=native#text/plain
 tests/webtbs/tw14958b.pp svneol=native#text/plain
 tests/webtbs/tw1501.pp svneol=native#text/plain
 tests/webtbs/tw1501.pp svneol=native#text/plain
+tests/webtbs/tw15296.pp svneol=native#text/plain
 tests/webtbs/tw1532.pp svneol=native#text/plain
 tests/webtbs/tw1532.pp svneol=native#text/plain
 tests/webtbs/tw1539.pp svneol=native#text/plain
 tests/webtbs/tw1539.pp svneol=native#text/plain
 tests/webtbs/tw1567.pp svneol=native#text/plain
 tests/webtbs/tw1567.pp svneol=native#text/plain

+ 5 - 1
packages/fcl-db/src/sqlite/customsqliteds.pas

@@ -1326,7 +1326,11 @@ begin
       end;
       end;
     ftBoolean, ftWord:
     ftBoolean, ftWord:
       begin
       begin
-        Str(Word(Buffer^), TempStr);
+        //ensure that boolean True value is stored as 1
+        if Field.DataType = ftBoolean then
+          TempStr := IfThen(Boolean(Buffer^), '1', '0')
+        else
+          Str(Word(Buffer^), TempStr);
         EditItem^.Row[FieldOffset] := StrAlloc(Length(TempStr) + 1);
         EditItem^.Row[FieldOffset] := StrAlloc(Length(TempStr) + 1);
         Move(PChar(TempStr)^, (EditItem^.Row[FieldOffset])^, Length(TempStr) + 1);
         Move(PChar(TempStr)^, (EditItem^.Row[FieldOffset])^, Length(TempStr) + 1);
       end;  
       end;  

+ 5 - 4
packages/fcl-process/src/unix/simpleipc.inc

@@ -59,10 +59,11 @@ procedure TPipeClientComm.Connect;
 begin
 begin
   If Not ServerRunning then
   If Not ServerRunning then
     Owner.DoError(SErrServerNotActive,[Owner.ServerID]);
     Owner.DoError(SErrServerNotActive,[Owner.ServerID]);
-  // Use this line to allow more then one client communicating with one server
-  // at the same time
-  // FStream:=TFileStream.Create(FFileName,fmOpenWrite+fmShareDenyNone);
-  FStream:=TFileStream.Create(FFileName,fmOpenWrite);
+  // Use the sharedenynone line to allow more then one client 
+  // communicating with one server at the same time
+  // see also mantis 15219
+  FStream:=TFileStream.Create(FFileName,fmOpenWrite+fmShareDenyNone);
+  // FStream:=TFileStream.Create(FFileName,fmOpenWrite);
 end;
 end;
 
 
 procedure TPipeClientComm.Disconnect;
 procedure TPipeClientComm.Disconnect;

+ 3 - 0
packages/fcl-web/src/fphtml.pp

@@ -159,6 +159,7 @@ type
   private
   private
     FControlName: string;
     FControlName: string;
     FItems: TStrings;
     FItems: TStrings;
+    FjsOnChange: string;
     FPreSelected: string;
     FPreSelected: string;
     FSize: integer;
     FSize: integer;
     FUseValues: boolean;
     FUseValues: boolean;
@@ -173,6 +174,7 @@ type
     property PreSelected : string read FPreSelected write FPreSelected;
     property PreSelected : string read FPreSelected write FPreSelected;
     property Size : integer read FSize write FSize default 1;
     property Size : integer read FSize write FSize default 1;
     property ControlName : string read FControlName write FControlName;
     property ControlName : string read FControlName write FControlName;
+    property jsOnChange: string read FjsOnChange write FjsOnChange;
   end;
   end;
 
 
   { THTMLDatasetSelectProducer }
   { THTMLDatasetSelectProducer }
@@ -399,6 +401,7 @@ end;
 function THTMLSelectProducer.WriteContent(aWriter: THTMLWriter): THTMLCustomElement;
 function THTMLSelectProducer.WriteContent(aWriter: THTMLWriter): THTMLCustomElement;
 begin
 begin
   result := aWriter.FormSelect(FControlName, FPreselected, FSize, FItems, FUseValues);
   result := aWriter.FormSelect(FControlName, FPreselected, FSize, FItems, FUseValues);
+  THTML_select(result).onchange:=FjsOnChange;
 end;
 end;
 
 
 constructor THTMLSelectProducer.create(aOwner: TComponent);
 constructor THTMLSelectProducer.create(aOwner: TComponent);

+ 1 - 1
packages/iconvenc/src/iconvert.inc

@@ -50,7 +50,7 @@ begin
     // iconv has a buffer that needs flushing, specially if the last char is not #0
     // iconv has a buffer that needs flushing, specially if the last char is not #0
     iconv(H, nil, nil, @Dst, @Outlen);
     iconv(H, nil, nil, @Dst, @Outlen);
     lerr:=cerrno;
     lerr:=cerrno;
-    if (iconvres=Cint(-1)) and (lerr=ESysE2BIG) then
+    if (iconvres=size_t(-1)) and (lerr=ESysE2BIG) then
       begin
       begin
         Offset:=Dst-PChar(Res);
         Offset:=Dst-PChar(Res);
         SetLength(Res, Length(Res)+InLen*2+5); // 5 is minimally one utf-8 char
         SetLength(Res, Length(Res)+InLen*2+5); // 5 is minimally one utf-8 char

+ 65 - 59
packages/openal/examples/Makefile

@@ -1,5 +1,5 @@
 #
 #
-# Don't edit, this file is generated by FPCMake Version 2.0.0 [2009/08/02]
+# Don't edit, this file is generated by FPCMake Version 2.0.0 [2009/12/11]
 #
 #
 default: all
 default: all
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded
 MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded
@@ -265,178 +265,184 @@ UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
 endif
 endif
 PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 ifeq ($(FULL_TARGET),i386-linux)
 ifeq ($(FULL_TARGET),i386-linux)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),i386-go32v2)
 ifeq ($(FULL_TARGET),i386-go32v2)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),i386-win32)
 ifeq ($(FULL_TARGET),i386-win32)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),i386-os2)
 ifeq ($(FULL_TARGET),i386-os2)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),i386-freebsd)
 ifeq ($(FULL_TARGET),i386-freebsd)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),i386-beos)
 ifeq ($(FULL_TARGET),i386-beos)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),i386-haiku)
 ifeq ($(FULL_TARGET),i386-haiku)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),i386-netbsd)
 ifeq ($(FULL_TARGET),i386-netbsd)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),i386-solaris)
 ifeq ($(FULL_TARGET),i386-solaris)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),i386-qnx)
 ifeq ($(FULL_TARGET),i386-qnx)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),i386-netware)
 ifeq ($(FULL_TARGET),i386-netware)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),i386-openbsd)
 ifeq ($(FULL_TARGET),i386-openbsd)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),i386-wdosx)
 ifeq ($(FULL_TARGET),i386-wdosx)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),i386-darwin)
 ifeq ($(FULL_TARGET),i386-darwin)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),i386-emx)
 ifeq ($(FULL_TARGET),i386-emx)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),i386-watcom)
 ifeq ($(FULL_TARGET),i386-watcom)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),i386-netwlibc)
 ifeq ($(FULL_TARGET),i386-netwlibc)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),i386-wince)
 ifeq ($(FULL_TARGET),i386-wince)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),i386-embedded)
 ifeq ($(FULL_TARGET),i386-embedded)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),i386-symbian)
 ifeq ($(FULL_TARGET),i386-symbian)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-linux)
 ifeq ($(FULL_TARGET),m68k-linux)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-freebsd)
 ifeq ($(FULL_TARGET),m68k-freebsd)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-netbsd)
 ifeq ($(FULL_TARGET),m68k-netbsd)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-amiga)
 ifeq ($(FULL_TARGET),m68k-amiga)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-atari)
 ifeq ($(FULL_TARGET),m68k-atari)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-openbsd)
 ifeq ($(FULL_TARGET),m68k-openbsd)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-palmos)
 ifeq ($(FULL_TARGET),m68k-palmos)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),m68k-embedded)
 ifeq ($(FULL_TARGET),m68k-embedded)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-linux)
 ifeq ($(FULL_TARGET),powerpc-linux)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-netbsd)
 ifeq ($(FULL_TARGET),powerpc-netbsd)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-amiga)
 ifeq ($(FULL_TARGET),powerpc-amiga)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-macos)
 ifeq ($(FULL_TARGET),powerpc-macos)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-darwin)
 ifeq ($(FULL_TARGET),powerpc-darwin)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-morphos)
 ifeq ($(FULL_TARGET),powerpc-morphos)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc-embedded)
 ifeq ($(FULL_TARGET),powerpc-embedded)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-linux)
 ifeq ($(FULL_TARGET),sparc-linux)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-netbsd)
 ifeq ($(FULL_TARGET),sparc-netbsd)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-solaris)
 ifeq ($(FULL_TARGET),sparc-solaris)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),sparc-embedded)
 ifeq ($(FULL_TARGET),sparc-embedded)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-linux)
 ifeq ($(FULL_TARGET),x86_64-linux)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-freebsd)
 ifeq ($(FULL_TARGET),x86_64-freebsd)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
+endif
+ifeq ($(FULL_TARGET),x86_64-solaris)
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-darwin)
 ifeq ($(FULL_TARGET),x86_64-darwin)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-win64)
 ifeq ($(FULL_TARGET),x86_64-win64)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),x86_64-embedded)
 ifeq ($(FULL_TARGET),x86_64-embedded)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),arm-linux)
 ifeq ($(FULL_TARGET),arm-linux)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),arm-palmos)
 ifeq ($(FULL_TARGET),arm-palmos)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),arm-darwin)
 ifeq ($(FULL_TARGET),arm-darwin)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),arm-wince)
 ifeq ($(FULL_TARGET),arm-wince)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),arm-gba)
 ifeq ($(FULL_TARGET),arm-gba)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),arm-nds)
 ifeq ($(FULL_TARGET),arm-nds)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),arm-embedded)
 ifeq ($(FULL_TARGET),arm-embedded)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),arm-symbian)
 ifeq ($(FULL_TARGET),arm-symbian)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc64-linux)
 ifeq ($(FULL_TARGET),powerpc64-linux)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc64-darwin)
 ifeq ($(FULL_TARGET),powerpc64-darwin)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),powerpc64-embedded)
 ifeq ($(FULL_TARGET),powerpc64-embedded)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),avr-embedded)
 ifeq ($(FULL_TARGET),avr-embedded)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),armeb-linux)
 ifeq ($(FULL_TARGET),armeb-linux)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 ifeq ($(FULL_TARGET),armeb-embedded)
 ifeq ($(FULL_TARGET),armeb-embedded)
-override TARGET_PROGRAMS+=madopenal
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
+endif
+ifeq ($(FULL_TARGET),mipsel-linux)
+override TARGET_PROGRAMS+=madopenal captureplaybackopenal
 endif
 endif
 override INSTALL_FPCPACKAGE=y
 override INSTALL_FPCPACKAGE=y
 ifdef REQUIRE_UNITSDIR
 ifdef REQUIRE_UNITSDIR

+ 1 - 1
packages/openal/examples/Makefile.fpc

@@ -3,7 +3,7 @@
 #
 #
 
 
 [target]
 [target]
-programs=madopenal
+programs=madopenal captureplaybackopenal
 
 
 [require]
 [require]
 packages=openal mad oggvorbis a52 dts modplug matroska
 packages=openal mad oggvorbis a52 dts modplug matroska

+ 116 - 0
packages/openal/examples/captureplaybackopenal.pas

@@ -0,0 +1,116 @@
+program CaptureAndPlayback;
+{$mode objfpc}
+
+uses
+  sysutils, openal;
+
+const
+  Seconds = 5;                            //- We'll record for 5 seconds
+  Frequency = 8000;                       //- Recording a frequency of 8000
+  Format = AL_FORMAT_MONO16;              //- Recording 16-bit mono
+  BufferSize = (Frequency*2)*(Seconds+1); //- (frequency * 2bytes(16-bit)) * seconds
+
+var
+  pCaptureDevice: pALCDevice;                  //- Device used to capture audio
+  pPlaybackDevice: pALCDevice;                 //- Device used to playback audio
+  pPlaybackContext: pALCContext;               //- Playback context
+  pPlaybackSource: ALuint;                     //- Source for playback (in 3D sound would be located)
+  CaptureBuffer: array[0..BufferSize] of ALubyte; //- Capture buffer external from openAL, sized as calculated above for 5 second recording
+  PlayBuffer: ALInt;                           //- openAL internal playback buffer
+
+  //- These two are used to control when to begin/end recording and playback
+  Samples: ALInt;                //- count of the number of samples recorded
+  PlayState: ALInt;              //- playback state
+
+begin
+
+  //- Find out which extensions are supported and print them (could error check for capture extension here)
+  writeln('OpenAL Extensions = ',PChar(alGetString(AL_EXTENSIONS)));
+
+  //- Print device specifiers for default devices
+  writeln('ALC_DEFAULT_DEVICE_SPECIFIER = ',PChar(alcGetString(nil, ALC_DEFAULT_DEVICE_SPECIFIER )));
+  writeln('ALC_CAPTURE_DEVICE_SPECIFIER = ',PChar(alcGetString(nil, ALC_CAPTURE_DEVICE_SPECIFIER )));
+
+  //- Setup the input capture device (default device)
+  writeln('Setting up alcCaptureOpenDevice to use default device');
+  pcaptureDevice:=alcCaptureOpenDevice(nil, Frequency, Format, BufferSize);
+  if pcaptureDevice=nil then begin
+    raise exception.create('Capture device is nil!');
+    exit;
+  end;
+
+  //- Setup the output player device (default device)
+  writeln('Setting up alcOpenDevice to use default device');
+  pPlaybackDevice:=alcOpenDevice(nil);
+  if pPlaybackDevice=nil then
+    raise exception.create('Playback device is nil!');
+
+  //- Setup the output context, not sure why a context is needed, it just is ok?
+  writeln('Setting up alcCreateContext');
+  pPlaybackContext:=alcCreateContext(pPlaybackDevice,nil);
+  writeln('Making the playback context the current context (alcMakeContextCurrent)');
+  alcMakeContextCurrent(pPlaybackContext);
+
+  // Generate Buffer(s) for playback
+  alGetError(); // clear error code
+  alGenBuffers( 1, @PlayBuffer );
+  if alGetError() <> AL_NO_ERROR then
+    raise exception.create('Ack!! Error creating playback buffer(s)!');
+
+  // Generate Playback Sources - single source, not adjusting locational information for 3D sound
+  writeln('Setting up playback source (alGenSources)');
+  alGenSources(1, @pPlaybackSource);
+  if alGetError() <> AL_NO_ERROR then
+    raise exception.create('Ack an error creating a playback source!');
+
+
+  //===========================================================================
+  // Here's where we do the recording bit :)
+  //===========================================================================
+
+  //- Start capturing data
+  alcCaptureStart(PCaptureDevice);
+  repeat
+    alcGetIntegerv(pCaptureDevice, ALC_CAPTURE_SAMPLES, ALsizei(sizeof(ALint)), @samples);
+    Writeln(IntToStr(samples)+'/'+IntToStr(Seconds*Frequency)+' samples');
+  until samples>=seconds*frequency;
+
+  //- Capture the samples into our capture buffer
+  alcCaptureSamples(pCaptureDevice, @CaptureBuffer, samples);
+
+  //- Done recording
+  alcCaptureStop(pCaptureDevice);
+
+
+  //===========================================================================
+  // Here's where we do the playback bit :)
+  //===========================================================================
+
+  //- Load up the playback buffer from our capture buffer
+  alBufferData( PlayBuffer, Format, @CaptureBuffer, Samples*2, Frequency);
+
+  //- Queue the buffer for playback
+  alSourcei( pPlaybackSource, AL_BUFFER, PlayBuffer );
+
+  //- Play the sound
+  alSourcePlay(ALuint(pPlaybackSource));
+
+  //- Wait for the player to stop
+  repeat
+    alGetSourcei( pPlaybackSource, AL_SOURCE_STATE, PlayState);
+  until (PlayState <> AL_INITIAL) and (PlayState <> AL_PLAYING);
+
+
+  //===========================================================================
+  
+  //- Shutdown/Clean up the playback stuff
+  pPlaybackContext:=alcGetCurrentContext();
+  pPlaybackDevice:=alcGetContextsDevice(pPlaybackContext);
+  alcMakeContextCurrent(nil);
+  alcDestroyContext(pPlaybackContext);
+  alcCloseDevice(pPlaybackDevice);
+
+  //- Shutdown/Clean up the capture stuff
+  alcCaptureStop( pCaptureDevice );
+  alcCaptureCloseDevice( pCaptureDevice );
+end.

+ 18 - 0
rtl/bsd/ostypes.inc

@@ -106,6 +106,7 @@ TYPE
    pStat = ^stat;
    pStat = ^stat;
 
 
   { directory services }
   { directory services }
+{$ifndef darwinarm}
    dirent  = record
    dirent  = record
         d_fileno      : cuint32;                        // file number of entry
         d_fileno      : cuint32;                        // file number of entry
         d_reclen      : cuint16;                        // length of this record
         d_reclen      : cuint16;                        // length of this record
@@ -113,6 +114,19 @@ TYPE
         d_namlen      : cuint8;                         // length of string in d_name
         d_namlen      : cuint8;                         // length of string in d_name
         d_name        : array[0..(255 + 1)-1] of char;  // name must be no longer than this
         d_name        : array[0..(255 + 1)-1] of char;  // name must be no longer than this
    end;
    end;
+{$else not darwinarm}
+   {$packrecords 4}
+   { available on Mac OS X 10.6 and later, and used by all iPhoneOS versions }
+   dirent  = record
+        d_fileno      : cuint64;                        // file number of entry
+        d_seekoff     : cuint64;                        // seek offset (optional, used by servers)
+        d_reclen      : cuint16;                        // length of this record
+        d_namlen      : cuint16;                        // length of string in d_name
+        d_type        : cuint8;                         // file type, see below
+        d_name        : array[0..PATH_MAX-1] of char;        // name must be no longer than this
+   end;
+   {$packrecords c}
+{$endif darwinarm}
    TDirent = dirent;
    TDirent = dirent;
    pDirent = ^dirent;
    pDirent = ^dirent;
 
 
@@ -130,6 +144,10 @@ TYPE
 {$endif}
 {$endif}
         dd_rewind : clong;        // magic cookie for rewinding
         dd_rewind : clong;        // magic cookie for rewinding
         dd_flags  : cint;         // flags for readdir
         dd_flags  : cint;         // flags for readdir
+{$ifdef darwin}
+        __dd_lock : pthread_mutex_t; // for thread locking
+        __dd_td : pointer;        // telldir position recording
+{$endif}
    end;
    end;
    TDir    = dir;
    TDir    = dir;
    pDir    = ^dir;
    pDir    = ^dir;

+ 22 - 0
rtl/darwin/ptypes.inc

@@ -143,6 +143,27 @@ type
           val: array[0..1] of cint32;
           val: array[0..1] of cint32;
      end;
      end;
 
 
+{$ifdef cpuarm}
+     { structure used on iPhoneOS and available on Mac OS X 10.6 and later }
+     tstatfs = record
+          bsize : cuint32;
+          iosize : cint32;
+          blocks : cuint64;
+          bfree : cuint64;
+          bavail : cuint64;
+          files : cuint64;
+          ffree : cuint64;
+          fsid : fsid_t;
+          owner : uid_t;
+          ftype : cuint32;
+          fflags : cuint32;
+          fssubtype : cuint32;
+          fstypename : array[0..(MFSNAMELEN)-1] of char;
+          mountpoint : array[0..(PATH_MAX)-1] of char;
+          mntfromname : array[0..(PATH_MAX)-1] of char;
+          reserved: array[0..7] of cuint32;
+     end;
+{$else}
      tstatfs = record
      tstatfs = record
           otype : cint16;
           otype : cint16;
           oflags : cint16;
           oflags : cint16;
@@ -165,6 +186,7 @@ type
           f_reserved3: char;
           f_reserved3: char;
           reserved4: array[0..3] of clong;
           reserved4: array[0..3] of clong;
        end;
        end;
+{$endif}
     pstatfs = ^tstatfs;
     pstatfs = ^tstatfs;
 
 
     mbstate_t = record
     mbstate_t = record

+ 1 - 1
rtl/inc/system.inc

@@ -880,7 +880,7 @@ begin
 end;
 end;
 
 
 
 
-Procedure Halt(ErrNum: Byte);
+Procedure Halt(ErrNum: Longint);
 Begin
 Begin
   ExitCode:=Errnum;
   ExitCode:=Errnum;
   Do_Exit;
   Do_Exit;

+ 1 - 1
rtl/inc/systemh.inc

@@ -993,7 +993,7 @@ procedure DumpExceptionBackTrace(var f:text);
 
 
 Procedure RunError(w:Word);
 Procedure RunError(w:Word);
 Procedure RunError;{$ifdef SYSTEMINLINE}inline;{$endif}
 Procedure RunError;{$ifdef SYSTEMINLINE}inline;{$endif}
-Procedure halt(errnum:byte);
+Procedure halt(errnum:Longint);
 {$ifdef FPC_HAS_FEATURE_HEAP}
 {$ifdef FPC_HAS_FEATURE_HEAP}
 Procedure AddExitProc(Proc:TProcedure);
 Procedure AddExitProc(Proc:TProcedure);
 {$endif FPC_HAS_FEATURE_HEAP}
 {$endif FPC_HAS_FEATURE_HEAP}

+ 4 - 14
rtl/inc/variants.pp

@@ -1127,19 +1127,7 @@ end;
 {$ifndef FPUNONE}
 {$ifndef FPUNONE}
 function DoVarCmpFloat(const Left, Right: Double; const OpCode: TVarOp): ShortInt;
 function DoVarCmpFloat(const Left, Right: Double; const OpCode: TVarOp): ShortInt;
 begin
 begin
-  if SameValue(Left, Right) then
-    Result := 0
-  else if (OpCode in [opCmpEq, opCmpNe]) or (Left < Right) then
-    Result := -1
-  else
-    Result := 1;
-end;
-
-
-function DoVarCmpDate(const Left, Right: TDateTime; const OpCode: TVarOp): ShortInt;
-begin
-  { dates have to match exactly, all bits encode time information }
-  if(Left = Right) then
+  if Left = Right then
     Result := 0
     Result := 0
   else if (OpCode in [opCmpEq, opCmpNe]) or (Left < Right) then
   else if (OpCode in [opCmpEq, opCmpNe]) or (Left < Right) then
     Result := -1
     Result := -1
@@ -1275,7 +1263,7 @@ begin
       else
       else
         Result := DoVarCmpWStr(vl, vr, OpCode);
         Result := DoVarCmpWStr(vl, vr, OpCode);
 {$ifndef FPUNONE}
 {$ifndef FPUNONE}
-    ctDate:     Result := DoVarCmpDate(VariantToDate(vl), VariantToDate(vr), OpCode);
+    ctDate:     Result := DoVarCmpFloat(VariantToDate(vl), VariantToDate(vr), OpCode);
     ctCurrency: Result := DoVarCmpCurr(VariantToCurrency(vl), VariantToCurrency(vr));
     ctCurrency: Result := DoVarCmpCurr(VariantToCurrency(vl), VariantToCurrency(vr));
 {$endif}
 {$endif}
     ctString:
     ctString:
@@ -2197,6 +2185,8 @@ begin
       RefAnyProc(Dest);
       RefAnyProc(Dest);
     end else if vType and varArray <> 0 then
     end else if vType and varArray <> 0 then
       DoVarCopyArray(Dest, Source, @DoVarCopy)
       DoVarCopyArray(Dest, Source, @DoVarCopy)
+    else if (vType and varByRef <> 0) and (vType xor varByRef = varString) then
+      Dest := Source
     else if FindCustomVariantType(vType, Handler) then
     else if FindCustomVariantType(vType, Handler) then
       Handler.Copy(Dest, Source, False)
       Handler.Copy(Dest, Source, False)
     else
     else

+ 3 - 3
rtl/solaris/termios.inc

@@ -67,13 +67,13 @@
 
 
   function tcgetattr(_para1:cint; var _para2:termios):cint;cdecl;external;
   function tcgetattr(_para1:cint; var _para2:termios):cint;cdecl;external;
 
 
-(* Const before type ignored *)
-  function tcsetattr(_para1:cint; _para2:cint; const _para3:termios):cint;cdecl;external;
-
   function tcgetattr(_para1:cint; _para2:Ptermios):cint;cdecl;external;
   function tcgetattr(_para1:cint; _para2:Ptermios):cint;cdecl;external;
 
 
 (* Const before type ignored *)
 (* Const before type ignored *)
   function tcsetattr(_para1:cint; _para2:cint; _para3:Ptermios):cint;cdecl;external;
   function tcsetattr(_para1:cint; _para2:cint; _para3:Ptermios):cint;cdecl;external;
+(* Const before type ignored *)
+  function tcsetattr(_para1:cint; _para2:cint; const _para3:termios):cint;cdecl;
+
 
 
 //  function tcsendbreak(_para1:cint; _para2:cint):cint;cdecl;
 //  function tcsendbreak(_para1:cint; _para2:cint):cint;cdecl;
 
 

+ 8 - 0
rtl/solaris/termiosproc.inc

@@ -18,6 +18,14 @@
                          IOCtl and Termios calls
                          IOCtl and Termios calls
 ******************************************************************************}
 ******************************************************************************}
 
 
+{ Old version directly called the C code but
+  this is wrong if the constant is pusehd directly on stack,
+  without passing the address as is done for i386 code generator PM }
+
+function tcsetattr(_para1:cint; _para2:cint; const _para3:termios):cint;cdecl;
+  begin
+    tcsetattr:=tcsetattr(_para1,_para2,@_para3);
+  end;
 
 
 
 
 Procedure CFMakeRaw(var tios:TermIOS);
 Procedure CFMakeRaw(var tios:TermIOS);

+ 14 - 0
rtl/unix/cwstring.pp

@@ -181,6 +181,13 @@ procedure Wide2AnsiMove(source:pwidechar;var dest:ansistring;len:SizeInt);
     my0 : size_t;
     my0 : size_t;
     err: cint;
     err: cint;
   begin
   begin
+{$ifndef VER2_2}
+    if PtrInt(iconv_wide2ansi)=-1 then
+      begin
+        DefaultUnicode2AnsiMove(source,dest,len);
+	exit;
+      end;
+{$endif VER2_2}
     mynil:=nil;
     mynil:=nil;
     my0:=0;
     my0:=0;
     { rought estimation }
     { rought estimation }
@@ -240,6 +247,13 @@ procedure Ansi2WideMove(source:pchar;var dest:widestring;len:SizeInt);
     my0 : size_t;
     my0 : size_t;
     err: cint;
     err: cint;
   begin
   begin
+{$ifndef VER2_2}
+    if PtrInt(iconv_ansi2wide)=-1 then
+      begin
+        DefaultAnsi2UnicodeMove(source,dest,len);
+	exit;
+      end;
+{$endif VER2_2}
     mynil:=nil;
     mynil:=nil;
     my0:=0;
     my0:=0;
     // extra space
     // extra space

+ 20 - 2
rtl/win/crt.pp

@@ -336,17 +336,35 @@ begin
     $35:      Scancode := $95;   // \
     $35:      Scancode := $95;   // \
     $37:      Scancode := $96;   // *
     $37:      Scancode := $96;   // *
     $47..$53: Scancode := CtrlKeypadKeys[Scancode];
     $47..$53: Scancode := CtrlKeypadKeys[Scancode];
+    //Enter on Numpad
+    $1C:
+    begin
+      Scancode := $0A;
+      SpecialKey := False;
+    end;
     end
     end
   else if ShiftKey then
   else if ShiftKey then
     case Scancode of
     case Scancode of
     // Function keys
     // Function keys
     $3B..$44: inc(Scancode, $19);
     $3B..$44: inc(Scancode, $19);
     $57..$58: inc(Scancode, $30);
     $57..$58: inc(Scancode, $30);
+    //Enter on Numpad
+    $1C:
+    begin
+      Scancode := $0D;
+      SpecialKey := False;
+    end;
     end
     end
   else
   else
     case Scancode of
     case Scancode of
-    // Function keys
-    $57..$58: inc(Scancode, $2E); // F11 and F12
+      // Function keys
+      $57..$58: inc(Scancode, $2E); // F11 and F12
+      //Enter on NumPad
+      $1C:
+        begin
+          Scancode := $0D;
+          SpecialKey := False;
+        end;
   end;
   end;
   RemapScanCode := ScanCode;
   RemapScanCode := ScanCode;
 end;
 end;

+ 1 - 1
rtl/win/winsock2.pp

@@ -760,7 +760,7 @@ Const
         SG_UNCONSTRAINED_GROUP = $01;
         SG_UNCONSTRAINED_GROUP = $01;
         SG_CONSTRAINED_GROUP = $02;
         SG_CONSTRAINED_GROUP = $02;
 Type
 Type
-        GROUP = Word;
+        GROUP = u_long;
 
 
 {       WinSock 2 extension -- data type for WSAEnumNetworkEvents() }
 {       WinSock 2 extension -- data type for WSAEnumNetworkEvents() }
         TWSANetworkEvents = record
         TWSANetworkEvents = record

+ 49 - 0
tests/webtbs/tw15296.pp

@@ -0,0 +1,49 @@
+program TestProject;
+
+{$mode objfpc}{$H+}
+
+uses
+  SysUtils, TypInfo;
+
+type
+  TTestObject = class(TObject)
+  private
+    FDate1: TDateTime;
+    FDate2: TDateTime;
+  published
+    property Date1: TDateTime read FDate1 write FDate1;
+    property Date2: TDateTime read FDate2 write FDate2;
+  end;
+
+var
+  VarDate1: Variant;
+  VarDate2: Variant;
+  TestObject: TTestObject;
+
+begin
+  TestObject := TTestObject.Create;
+  TestObject.Date1 := EncodeDate(1999, 02, 06) + EncodeTime(20, 0, 0, 0);
+  TestObject.Date2 := EncodeDate(1999, 02, 06) + EncodeTime(20, 0, 0, 1);
+
+  // works ok
+  //VarDate1 := TestObject.Date1;
+  //VarDate2 := TestObject.Date2;
+
+  // rounding occurs
+  // variants are interpreted as floats
+  // but this code works in delphi as expected (different when comparing)
+  // so don't know is this comparisson problem or values are rounded too much.
+  VarDate1 := GetPropValue(TestObject, 'Date1');
+  VarDate2 := GetPropValue(TestObject, 'Date2');
+
+  if VarDate1 = VarDate2 then
+    begin
+      WriteLn('Dates are equal.');
+      halt(1);
+    end
+  else
+    WriteLn('Dates are not equal.');
+
+  TestObject.Free;
+end.
+