what is __close? lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- cnyahoo · 2016-03-28 05:29 I saw a example code listed prev topic about epoll, I cant find __close declaration about it? would you please tell me. thank you. I use delphi 7 some years ago,but newier for freepascal on linux. ---------------------------------------------------------------------- marcov · 2016-03-28 13:23 Probably something Kylix or Delphi internal. Functions starting with _ or __ are nearly always internal and undocumented. FPC is not compatible with internal Delphi identifiers (and I assume even Delphi isn't over large periods). If it is *nix related, it might be simply baseunix.fpclose() ---------------------------------------------------------------------- cnyahoo · 2016-04-13 03:06 thanks. as i install fpc apt-get install lazarus,the version is 2.6. upgrade it (https://sourceforge.net/projects/lazarus/files/Lazarus%20L inux%20i386%20DEB/Lazarus%201.6/) all ok __close is   function __close(Handle: Integer): Integer; cdecl;external clib name 'close' ,which conflicts with system routines  close(f:ttextfile). ---------------------------------------------------------------------- marcov · 2016-04-13 08:01 FPC worked around that same problem by using a "fp" syntax. So the corresponding function there is baseunix.fpclose() While on Linux baseunix calls translate to direct kernel syscalls not libc externals, I think you can still safely use baseunix.fpclose(). Afaik libc doesn't add anything to that call (it has the fdclose(*file) functions for that)