Recent

Author Topic: [SOLVED] Synapse: How to communicate with *.local machine on *nix.  (Read 1482 times)

PascalDragon

  • Hero Member
  • *****
  • Posts: 5764
  • Compiler Developer
Re: Synapse: How to communicate with *.local machine on *nix.
« Reply #15 on: November 04, 2024, 09:02:42 pm »
If your mypc.local isn't in the (local) DNS server, I'm not sure how Linux gets its hostname.

.local domain names are not part of any DNS server, because they are provided through the MDNS system which is a multicast system without a central system. To resolve these names a multicast MDNS request is sent and is responded to by whatever system has this name.

af0815

  • Hero Member
  • *****
  • Posts: 1379
Re: [SOLVED] Synapse: How to communicate with *.local machine on *nix.
« Reply #16 on: November 05, 2024, 09:56:49 am »
If it is fixed, can anybody write the changes to the feature request. So the changes may be implemented.
regards
Andreas

Thaddy

  • Hero Member
  • *****
  • Posts: 16199
  • Censorship about opinions does not belong here.
Re: [SOLVED] Synapse: How to communicate with *.local machine on *nix.
« Reply #17 on: November 05, 2024, 10:04:58 am »
Andreas, what needs fixing?
If I smell bad code it usually is bad code and that includes my own code.

rvk

  • Hero Member
  • *****
  • Posts: 6591
Re: [SOLVED] Synapse: How to communicate with *.local machine on *nix.
« Reply #18 on: November 05, 2024, 10:11:20 am »
Andreas, what needs fixing?
The whole ssfpc.inc needs to be refactored to be more like sslinux.inc (including using get getaddrinfo instead of the older gethostname). I think that's not a 'small' fix.

I don't even know when sslinux.inc is used?
For Mac OS?
Not sure why sslinux.inc wasn't used for FPC-Linux.
sslinux.inc does even have IFDEF FPC in it, but it would NEVER get to there in FPC.

Code: Pascal  [Select][+][-]
  1. {$IFDEF CIL}
  2.   {$I ssdotnet.inc}
  3. {$ELSE}
  4.   {$IFDEF MSWINDOWS}
  5.     {$I sswin32.inc}
  6.   {$ELSE}
  7.     {$IFDEF WINCE}
  8.       {$I sswin32.inc}  //not complete yet!
  9.     {$ELSE}
  10.       {$IFDEF FPC}
  11.        {$IFDEF OS2}
  12.          {$I ssos2ws1.inc}
  13.        {$ELSE OS2}
  14.         {$I ssfpc.inc}
  15.        {$ENDIF OS2}
  16.       {$ELSE}
  17.         {$IFDEF POSIX}
  18.           {$I ssposix.inc} //experimental!
  19.         {$ELSE}
  20.           {$I sslinux.inc}
  21.         {$ENDIF}
  22.       {$ENDIF}
  23.     {$ENDIF}
  24.   {$ENDIF}
  25. {$ENDIF}

tetrastes

  • Hero Member
  • *****
  • Posts: 600
Re: [SOLVED] Synapse: How to communicate with *.local machine on *nix.
« Reply #19 on: November 05, 2024, 01:35:04 pm »
Not sure why sslinux.inc wasn't used for FPC-Linux.
sslinux.inc does even have IFDEF FPC in it, but it would NEVER get to there in FPC.

sslinux.inc uses Libc, and libc use :
Code: Pascal  [Select][+][-]
  1. {$if not defined(linux) or not defined(cpui386)}
  2.   {$error The KernelDefs unit is a legacy Kylix-compatibility unit that is only supported on Linux/i386. It is known not to work in various ways on other OSes and architectures (including Linux/x86_64). }
  3. {$endif}
  4.  
  5. unit libc deprecated 'Unportable Kylix legacy unit that only exists on Linux/x86. see http://wiki.freepascal.org/libc_unit ';

rvk

  • Hero Member
  • *****
  • Posts: 6591
Re: [SOLVED] Synapse: How to communicate with *.local machine on *nix.
« Reply #20 on: November 05, 2024, 04:26:12 pm »
If it is fixed, can anybody write the changes to the feature request. So the changes may be implemented.
Wouldn't the changes not be the same as the fix in doublecmd?
issue: https://github.com/doublecmd/doublecmd/issues/1604#issuecomment-2382279475
fix: https://github.com/doublecmd/doublecmd/commit/2aa9fe2f5a2b6a5d1ad779bca2673037c6bf37f2

Not sure why this wasn't also submitted to synapse directly.

 

TinyPortal © 2005-2018