Re: [fpc-devel] rtl/win/winsock2.pp

2012-09-19 Thread Martin

On 15/09/2012 02:19, Martin wrote:
The unit contains 3 declarations (just picking one example, may be 
similar for other functions)


function WSASocketA( af, iType, protocol : Longint; lpProtocolInfo : 
LPWSAProtocol_InfoA; g : GROUP; dwFlags : DWORD ): TSocket; stdcall; 
external WINSOCK2_DLL name 'WSASocketA';
function WSASocketW( af, iType, protocol : Longint; lpProtocolInfo : 
LPWSAProtocol_InfoW; g : GROUP; dwFlags : DWORD ): TSocket; stdcall; 
external WINSOCK2_DLL name 'WSASocketW';
function WSASocket( af, iType, protocol : Longint; lpProtocolInfo : 
LPWSAProtocol_Info; g : GROUP; dwFlags : DWORD ): TSocket; stdcall; 
external WINSOCK2_DLL name 'WSASocket';


Does the last one work. It gives an error on my vista 32 bit (dll 
entry point not found)


My understanding is that windows offers the A and W versions, and the 
none-postfix version is just an in application alias to one of them?
Or is there a win version, where the dll actually exports 'WSASocket' 
? (And if so, shouldn't it be IFDEF and mapped to A or W for other win 
versions?


I hadno answer? Did Imiss it?

See 
http://forum.lazarus.freepascal.org/index.php/topic,18267.0/topicseen.html

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


[fpc-devel] URIParser is not up to spec

2012-09-19 Thread Graeme Geldenhuys

Hi,

I have to deal with complex URL's in a new part in my project, and 
thought I would take advantage of the already existing URIParser unit in 
FPC. At closer inspection I noticed that the URIParser is not up to 
RFC-3986 specs. Even some of the terminology and values used in 
URIParser is different to the official RFC's.


Would anybody mind if I updated the URIParser unit to be more correct, 
or is it the FPC pereference to leave it as it is, and I'll make my own 
amendments for my project.


  http://tools.ietf.org/rfc/rfc3986.txt


Pay particular attention to section 3 (Syntax Components).

  http://tools.ietf.org/html/rfc3986#section-3


Regards,
  - Graeme -
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] rtl/win/winsock2.pp

2012-09-19 Thread Sven Barth

Am 15.09.2012 02:19, schrieb Martin:

The unit contains 3 declarations (just picking one example, may be
similar for other functions)

function WSASocketA( af, iType, protocol : Longint; lpProtocolInfo :
LPWSAProtocol_InfoA; g : GROUP; dwFlags : DWORD ): TSocket; stdcall;
external WINSOCK2_DLL name 'WSASocketA';
function WSASocketW( af, iType, protocol : Longint; lpProtocolInfo :
LPWSAProtocol_InfoW; g : GROUP; dwFlags : DWORD ): TSocket; stdcall;
external WINSOCK2_DLL name 'WSASocketW';
function WSASocket( af, iType, protocol : Longint; lpProtocolInfo :
LPWSAProtocol_Info; g : GROUP; dwFlags : DWORD ): TSocket; stdcall;
external WINSOCK2_DLL name 'WSASocket';

Does the last one work. It gives an error on my vista 32 bit (dll entry
point not found)

My understanding is that windows offers the A and W versions, and the
none-postfix version is just an in application alias to one of them?
Or is there a win version, where the dll actually exports 'WSASocket' ?
(And if so, shouldn't it be IFDEF and mapped to A or W for other win
versions?


Sorry for the late answer...

It does indeed look like an error as Dependency Walker only reports the 
WSASocketA and WSASocketW exports. You should file a bug report to 
correct all imports in that unit in the same way as the Windows unit works.


Regards,
Sven

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] URIParser is not up to spec

2012-09-19 Thread Sergei Gorelkin

19.09.2012 11:45, Graeme Geldenhuys пишет:

Hi,

I have to deal with complex URL's in a new part in my project, and thought I 
would take advantage of
the already existing URIParser unit in FPC. At closer inspection I noticed that 
the URIParser is not
up to RFC-3986 specs. Even some of the terminology and values used in URIParser 
is different to the
official RFC's.

Would anybody mind if I updated the URIParser unit to be more correct, or is 
it the FPC
pereference to leave it as it is, and I'll make my own amendments for my 
project.

   http://tools.ietf.org/rfc/rfc3986.txt

Originally uriParser code was written to handle only URLs, without RFC3986 in mind. Later I updated 
it so the logic became closer to RFC3986, but had to keep URI syntax components as is in order to 
preserve compatibility with existing code.


So I think if we go after strict RFC compliance, we should introduce a new unit and deprecate an old 
one.


Regards,
Sergei
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] URIParser is not up to spec

2012-09-19 Thread michael . vancanneyt



On Wed, 19 Sep 2012, Sergei Gorelkin wrote:


19.09.2012 11:45, Graeme Geldenhuys пишет:

Hi,

I have to deal with complex URL's in a new part in my project, and thought 
I would take advantage of
the already existing URIParser unit in FPC. At closer inspection I noticed 
that the URIParser is not
up to RFC-3986 specs. Even some of the terminology and values used in 
URIParser is different to the

official RFC's.

Would anybody mind if I updated the URIParser unit to be more correct, or 
is it the FPC
pereference to leave it as it is, and I'll make my own amendments for my 
project.


   http://tools.ietf.org/rfc/rfc3986.txt

Originally uriParser code was written to handle only URLs, without RFC3986 in 
mind. Later I updated it so the logic became closer to RFC3986, but had to 
keep URI syntax components as is in order to preserve compatibility with 
existing code.


So I think if we go after strict RFC compliance, we should introduce a new 
unit and deprecate an old one.


I agree.

Michael.___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel