Recent

Author Topic: Winsock and OS/2 Strange Issue  (Read 2295 times)

Thaddy

  • Hero Member
  • *****
  • Posts: 15526
  • Censorship about opinions does not belong here.
Re: Winsock and OS/2 Strange Issue
« Reply #15 on: February 15, 2024, 04:36:06 pm »
What is this then:
Code: Pascal  [Select][+][-]
  1. {$mode objfpc}
  2. uses sockets;
  3.  
  4. function inet_ntoa (const inaddr:longint):string;inline;overload;
  5. var
  6.  addr:in_addr;
  7. begin
  8.   addr.s_addr :=  inaddr;
  9.   Result:=NetAddrToStr(addr);
  10. end;
  11.  
  12. function inet_ntoa (const inaddr:in_addr):string;inline;overload;
  13. begin
  14.   Result:=NetAddrToStr(inaddr);
  15. end;
  16.  
  17. begin
  18.  writeln(inet_ntoa(16777343));
  19. end.
This should work on the OS/2 family too, just with FPC provided sockets units.
« Last Edit: February 15, 2024, 04:40:25 pm by Thaddy »
My great hero has found the key to the highway. Rest in peace John Mayall.
Playing: "Broken Wings" in your honour. As well as taking out some mouth organs.

 

TinyPortal © 2005-2018