Hi,
the following program returns EBADF from fileno on the Hurd, this breaks
new_tmpfile in perl completely (because perl has a one-for-all open
routine which always examines the file pointer thoroughly).
This was also caught by the perl test harnish.
Thanks,
Marcus
#define _GNU_SOURCE 1
#include <unistd.h>
#include <stdio.h>
#include <sys/stat.h>
#include <errno.h>
#include <string.h>
#include <error.h>
main()
{
FILE *fp;
int fd;
struct stat statbuf;
fp = tmpfile();
if (!fp)
error (1, errno, "tmpfile");
fd = fileno (fp);
if (fd == -1)
error (1, errno, "fileno");
if (fstat (fd, &statbuf) < 0)
error (1, errno, "fstat");
}
_______________________________________________
Bug-hurd mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-hurd