[Solved] C open() function in Lazarus? lazarus / 32-Linux ---------------------------------------------------------------------- Edson · 2016-12-04 03:53 Can someone tell me please, if there is (and what is) some equivalent in fpc/lazarus, to the system C function open()? It's declared something like:  int open (const char *__file, int __oflag, ...) I need to port a C code in linux OS. ---------------------------------------------------------------------- derek.john.evans · 2016-12-04 04:11 In SysUtils; FileOpen/FileClose/FileRead/FileWrite http://www.freepascal.org/docs-html/rtl/sysutils/fileopen.html Are close to 100% compatible. ---------------------------------------------------------------------- skalogryz · 2016-12-04 04:14 Quote from: Edson on December 04, 2016, 04:53:06 amI need to port a C code in linux OS. Lots of unix (linux) functions are fp- prefixed are declared in BaseUnix  / Unix units. If you're not planning to target Windows in future (or writing unix specific) you could use whose! For example C open() is fpopen in freepascal. ---------------------------------------------------------------------- Thaddy · 2016-12-04 07:20 I think you are not referring to a C Open() function perse, but to the unix fs open(). That's indeed as skalogryz wrote simply Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i  FpOpen('/path/to/device/file'); Note that FileOpen/FileClose/FileRead/FileWrite are cross platform, indeed, but under unix happen to use the FP prefixed functions from ./rtl/baseunix.pp like the above. Filestreams do the same.