Sign in Join

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

Mailing lists / fpc-pascal / 2008-07

chown on Mac OS X

5 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Tobias Giesen

Hello,

I am trying to call fpchown but it causes an infinite recursion. fpchmod works fine. This happens in all FPC 2.x versions.

Any ideas?

How can I recompile the FCL with debugging information, so I can trace into these problems with Lazarus?

Cheers,
Tobias

Tobias Giesen
to Tobias Giesen

Hi,

OK I added this as a bug:
http://mantis.freepascal.org/view.php?id=11705

This is caused by FpChown missing from oscdeclh.inc in the rtl/unix folder. I tried adding it but it causes an exception. But chown is present in the libc. Why can't it be called?

I can't believe that nobody uses chown from Pascal? Probably works on Linux but not on other Unix systems?

Cheers,
Tobias

Tobias Giesen
to Tobias Giesen

Hi,

correction! Adding FpChown to oscdeclh.inc works fine. This line needs to be added:

Function FpChown (path : pChar; owner : TUid; group : TGid): cInt; cdecl; external clib name 'chown';

to oscdeclh.inc in the rtl/unix folder.

Cheers,
Tobias

Florian Klaempfl
to Tobias Giesen
Show quoted text 11 lines
Hi, correction! Adding FpChown to oscdeclh.inc works fine. This line needs to be added: Function FpChown (path : pChar; owner : TUid; group : TGid): cInt; cdecl; external clib name 'chown'; to oscdeclh.inc in the rtl/unix folder. Cheers, Tobias

Better add such information to the bug report so it won't get lost.

Florian Klaempfl
to Florian Klaempfl
Show quoted text 15 lines
Tobias Giesen schrieb: > Hi, > > correction! Adding FpChown to oscdeclh.inc works fine. This line needs > to be added: > > Function FpChown (path : pChar; owner : TUid; group : TGid): cInt; > cdecl; external clib name 'chown'; > > to oscdeclh.inc in the rtl/unix folder. > > Cheers, > Tobias Better add such information to the bug report so it won't get lost.

Just noticed that you already did, thanks.