Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2015-06

fpchmod(thefile, S_IRWXU) not for freeBSD ?

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

fredvs

Hello.

This to advice that fpchmod(thefile, S_IRWXU) is not working with freeBSD. This because some const are missing for FreeBSD in FPC's RTL.

But, thanks to Graeme, this solves the thing =>

...
{$IFDEF FREEBSD}
const
  S_IRWXU = S_IRUSR or S_IWUSR or S_IXUSR;
  S_IRWXG = S_IRGRP or S_IWGRP or S_IXGRP;
  S_IRWXO = S_IROTH or S_IWOTH or S_IXOTH;
{$ENDIF}
...
Implementation
...

Fre;D

-----
Many thanks ;-)

View this message in context: http://free-pascal-general.1045716.n5.nabble.com/fpchmod-thefile-S-IRWXU-not-for-freeBSD-tp5721913.html Sent from the Free Pascal - General mailing list .

Reply by email

Graeme Geldenhuys
to fredvs
fredvs wrote
This to advice that fpchmod(thefile, S_IRWXU) is not working with freeBSD. This because some const are missing for FreeBSD in FPC's RTL.

That should be available in FPC 3.0 whenever that arrives. I don't know if it was even added to 2.6_fixes branch though.

http://mantis.freepascal.org/view.php?id=26373

Another one reported over 2 years ago has still not been acted on.

http://mantis.freepascal.org/view.php?id=23991

I confirmed these constants are in FreeBSD's fcntl.h file and in OSX, but nothing has come from it. :-/

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email