[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: problems compiling plan under libc6

S_IFDIR is defined via <sys/stat.h>. In fact this includes <statbuf.h>
which has the real value. Just try this:

#include <sys/stat.h>

struct stat             sbuf;

if (sbuf.st_mode & S_IFDIR) exit(0);

It compiles cleanly on my machine. However, file_r.c doesn't. But to be
able to dig further I'd need more than file_r.c, some local include
files are missing (like config.h). 

Dr. Michael Meskes, Project-Manager    | topsystem Systemhaus GmbH
meskes@topsystem.de                    | Europark A2, Adenauerstr. 20
meskes@debian.org                      | 52146 Wuerselen
Go SF49ers! Go Rhein Fire!             | Tel: (+49) 2405/4670-44
Use Debian GNU/Linux!                  | Fax: (+49) 2405/4670-10

>-----Original Message-----
>From:	Colin R. Telmer [SMTP:telmerco@qed.econ.queensu.ca]
>Sent:	Thursday, June 26, 1997 10:58 PM
>To:	Thomas Driemeyer
>Cc:	Die Adresse des Empfängers ist unbekannt.
>Subject:	problems compiling plan under libc6
>I really don't program in C, so I have no idea if this is something easy
>to figure out or needs a great amount of reworking. Anyway, given that
>debian will require all packages to be compiled with libc6 in the near
>future, I thought I would see if this is fixable. The error message from
>gcc is:
>  gcc -s -D_POSIX_SOURCE -DNOLOCK -DLINUX -DRABBITS   -c file_r.c
>  file_r.c: In function `read_mainlist':
>  file_r.c:132: `S_IFDIR' undeclared (first use this function)
>  file_r.c:132: (Each undeclared identifier is reported only once
>  file_r.c:132: for each function it appears in.)
>  make[1]: *** [file_r.o] Error 1
>  make[1]: Leaving directory `/home/telmerco/debian/plan-1.6.1/src'
>  make: *** [linux] Error 2 
>The lines around line 132 in file_r.c are
>	if (!stat(user[u].path, &sbuf) && (sbuf.st_mode & S_IFDIR))
>		sprintf(path, "%s/%s", user[u].path, DB_FILE);
>and the entire file_r.c is attached. The error message seems to be saying
>that the code is trying to do a bitwise AND with something that is
>undefined. However, I have no idea why this would work with libc5 and not
>I really don't know what other information to add except for some lib and
>gcc versions (below). Any help is gratefully appreciated. Cheers, Colin. 
>ii  libc6           2.0.4-1        The GNU C library version 2
>ii  libc6-dev       2.0.4-1        The GNU C library version 2
>ii  libc6-doc       2.0.4-1        The GNU C library version 2
>ii  gcc         The GNU C compiler
>ii  bash            2.0-3          The GNU Bourne Again SHell
>	  Colin R. Telmer, Institute of Intergovernmental Relations
>		School of Policy Studies, Queen's University
>		     Kingston, Ontario, Canada, K7L-3N6
>	      (613)545-6000x4219   telmerco@qed.econ.queensu.ca
>	   PGP Public Key at <URL:http://terrapin.econ.queensu.ca>

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org .
Trouble?  e-mail to templin@bucknell.edu .

Reply to: