[M3devel] Solaris lstat st_nlink issue? Re: CVSup questions.

Tony Hosking hosking at cs.purdue.edu
Wed Oct 31 16:06:23 CET 2007


Thanks, this was useful.  I'm not sure when it happened but Solaris  
now defines nlink_t=long.  This program now seems to do the right  
thing.  I'll check in the updated now.

On Oct 25, 2007, at 9:40 PM, Alex Bochannek wrote:

> OK, just for laughs, I just tried this. Simple program:
>
> UNSAFE MODULE Main;
>
> IMPORT Ustat, Fmt, IO, M3toC;
>
> VAR stat: Ustat.struct_stat;
>      ret: INTEGER;
>
> BEGIN
>      ret := Ustat.lstat(M3toC.CopyTtoS("/tmp"), ADR(stat));
>      IO.Put(Fmt.Unsigned(stat.st_nlink) & "\n");
>      ret := Ustat.lstat(M3toC.CopyTtoS("/tmp/foo"), ADR(stat));
>      IO.Put(Fmt.Unsigned(stat.st_nlink) & "\n");
> END Main.
>
> I run it and the output is:
>
> 0
> 0
>
> Alex.




More information about the M3devel mailing list