[fpc-pascal] netdb, TCP, and DNS queries

Michael Van Canneyt michael at freepascal.org
Sun Dec 6 23:29:18 CET 2020



On Mon, 7 Dec 2020, Noel Duffy via fpc-pascal wrote:

> On 7/12/20 12:41 am, Michael Van Canneyt via fpc-pascal wrote:
>> 
>> On Sun, 6 Dec 2020, Noel Duffy via fpc-pascal wrote:
>> 
>>> Hi all,
>>>
>>> Following up on the work I've being doing to add support for DNS queries 
> over TCP to netdb and to add support for querying all of the standard 
> resource types such as MX, SOA, TXT, NS, etc, I've added the proposed changes 
> to a note in the Bugtracker:
>>>
>>> https://bugs.freepascal.org/view.php?id=37906#c127368
>>>
>>> This isn't yet in patch form. I've just created a copy of netdb.pp and 
> renamed it to newnetdb.pp. I'm posting about it now to get some feedback on 
> it.
>> 
>> In general it looks good. 2 remarks:
>> 
>> I did see you removed the comments about byte order, I don't think that's a 
> good idea, these comments have their use :-)
>
> Which comments are you referring to? See my comments below about using 3.2.0.
> 
>> The second point is that you removed the USE_LIBC define.
>> The netdb unit works only with USE_LIBC on Android.

I made a typo, it should be FPC_USE_LIBC

>
> I've gone back and done a diff with the original netdb.pp and I'm not seeing 
> any mention of libc. I based my version on the one that shipped with 3.2.0, 
> not trunk. 3.2.0 has these defines:
>
>  {$DEFINE ETC_BY_ENV}
>  {$DEFINE SFN_VERSION}
>  {$DEFINE ETC_BY_ENV}
>  {$DEFINE SFN_VERSION}
>  {$DEFINE ETC_BY_ENV}
>  {$DEFINE SFN_VERSION}
>  {$DEFINE UNIX_ETC}

See below.


> All of these are in the new version as well. Perhaps I need to redo the 
> changes against trunk to avoid confusion.

Yes, please.

Line 55 contains:

{$if defined(android)}
   {$define FPC_USE_LIBC}
{$endif}

Michael.


More information about the fpc-pascal mailing list