Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* stat() broken under RH 5.0??
@ 1998-06-01 15:52 Mike
  1998-06-01 21:45 ` Quant-X Alpha Linux Support
  0 siblings, 1 reply; 5+ messages in thread
From: Mike @ 1998-06-01 15:52 UTC (permalink / raw)
  To: axp-list, joeyen


   We cannot get stat (in a C program, not the shell command) to work
correctly under RedHat 5.0 running on an alpha (kernel 2.0.30).  Any help 
would be appreciated or any work around that returns the file mode for
a given file.

   Here is the code we are using (it works fine under SunOS) and according
to the man pages it should work okay on the alpha as well.  It compiles
okay but segmentation faults.
   gdb gives the following error

   Program received signal SIGSEGV, Segmentation fault.
   __xstat () at ../sysdeps/unix/sysv/linux/xstat.c:52
   ../sysdeps/unix/sysv/linux/xstat.c:52: No such file or directory.


#include <sys/stat.h>
#include <dirent.h>
#include <unistd.h>

main()
{
   struct stat *buf;
   stat("teststat.c",buf);
   printf("%d\n",buf->st_mode);
}

   Thanks Mike


^ permalink raw reply	[flat|nested] 5+ messages in thread
[parent not found: <Pine.SOL.3.96.980601182010.13382A-100000@tarkovsky.npac.syr.edu>]

end of thread, other threads:[~1998-06-02 15:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-06-01 15:52 stat() broken under RH 5.0?? Mike
1998-06-01 21:45 ` Quant-X Alpha Linux Support
1998-06-02 13:20   ` Bill Roman
1998-06-02 15:07     ` Michal Jaegermann
     [not found] <Pine.SOL.3.96.980601182010.13382A-100000@tarkovsky.npac.syr.edu>
1998-06-02  0:37 ` Quant-X Alpha Linux Support

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox