pkgsrc-Bugs archive

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

Re: pkg/31489



The following reply was made to PR pkg/31489; it has been noted by GNATS.

From: RUMI Szabolcs <rumi%rtfm.hu@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: pkg/31489
Date: Thu, 6 Oct 2005 12:16:27 +0200

 looks like the __P macro wasn't defined.
 I added #define __P(x) x and it seems to work.
 
 I got past this but I ran into another problem. I don't know if it is a good
 practice but I'd think this synopsis allows me to append all compilation
 problem reports of this package to this PR so here is the next one:
 
 source='DirectoryScanner.c++' object='DirectoryScanner.o' libtool=no \
 depfile='.deps/DirectoryScanner.Po' tmpdepfile='.deps/DirectoryScanner.TPo' \
 depmode=tru64 /bin/ksh ../depcomp \
 cxx -DHAVE_CONFIG_H -I. -I. -I.. -I../include 
-DFAM_CONF=\"/usr/pkg/etc/fam.conf\"    -O2 -ieee -ieee -c -o 
DirectoryScanner.o `test -f 'DirectoryScanner.c++' || echo 
'./'`DirectoryScanner.c++
 cxx: Error: DirectoryScanner.c++, line 103: a value of type "dirent *" cannot
           be used to initialize an entity of type "direct *"
         struct direct *dp = readdir(dir);
 ----------------------------^
 cxx: Error: DirectoryScanner.c++, line 112: pointer to incomplete class type
           is not allowed
         if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, ".."))
 --------------------^
 cxx: Error: DirectoryScanner.c++, line 112: pointer to incomplete class type
           is not allowed
         if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, ".."))
 ------------------------------------------------^
 cxx: Error: DirectoryScanner.c++, line 116: pointer to incomplete class type
           is not allowed
         if (ep && !strcmp(dp->d_name, ep->name()))
 --------------------------^
 cxx: Error: DirectoryScanner.c++, line 122: pointer to incomplete class type
           is not allowed
         else if ((epp2 = match_name(&discard, dp->d_name)) != NULL)
 ----------------------------------------------^
 cxx: Error: DirectoryScanner.c++, line 132: pointer to incomplete class type
           is not allowed
         else if (ep && (epp2 = match_name(&ep->next, dp->d_name)))
 -----------------------------------------------------^
 cxx: Error: DirectoryScanner.c++, line 147: pointer to incomplete class type
           is not allowed
             ep = new DirEntry(dp->d_name, &directory, *epp);
 ------------------------------^
 cxx: Info: 7 errors detected in the compilation of "DirectoryScanner.c++".
 gmake[2]: *** [DirectoryScanner.o] Error 1
 gmake[2]: Leaving directory 
`/home/admin/pkgsrc/work/sysutils/fam/work/fam-2.7.0/src'
 gmake[1]: *** [all-recursive] Error 1
 gmake[1]: Leaving directory 
`/home/admin/pkgsrc/work/sysutils/fam/work/fam-2.7.0'
 gmake: *** [all] Error 2
 *** Error code 2
 
 Stop.
 
 Excerpt from the dirent.h of Tru64 UNIX:
 
 /*
  * The POSIX standard way of returning directory entries is in directory entry
  * structures, which are of variable length.  Each directory entry has
  * a struct direct at the front of it, containing its inode number,
  * the length of the entry, and the length of the name contained in
  * the entry.  These are followed by the name padded to a 4 byte boundary
  * with null bytes.  All names are guaranteed null terminated.
  * The maximum length of a name in a directory is returned by
  * pathconf(directory_pathname, _PC_NAME_MAX).  The type struct dirent is
  * a template for the beginning of the actual structure, since the
  * length is variable, and so should only be used to declare
  * struct dirent * pointer types.
  */
 
 Another excerpt from dirent.h:
 
 #ifndef _KERNEL
 #define direct dirent
 
 When I change the type of dp to struct dirent *, errors go away.
 



Home | Main Index | Thread Index | Old Index