*BSD News Article 24666


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!uniwa!harbinger.cc.monash.edu.au!msuinfo!agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!news.cic.net!destroyer!news.itd.umich.edu!altitude
From: altitude@css.itd.umich.edu (Alex Tang)
Newsgroups: comp.os.386bsd.questions
Subject: Re: dirent.h
Date: 3 Dec 1993 03:42:09 GMT
Organization: University of Michigan ITD/User Services
Lines: 33
Message-ID: <2dmcih$c0q@terminator.rs.itd.umich.edu>
References: <2dlrii$6so@terminator.rs.itd.umich.edu>
NNTP-Posting-Host: stimpy.css.itd.umich.edu
X-Newsreader: TIN [version 1.2 PL1]

Alex Tang (altitude@css.itd.umich.edu) wrote:
: Hi.  I'm running NetBSD-0.8.  I'm trying to build httpd, but i'm having a
: peculiar problem.  I keep getting errors from within the file
: /usr/include/dirent.h, (when i use cc), and
: /usr/local/lib/gcc-lib/i386--bsd.4.3/2.4.3/include (when I use gcc-2.4.5), 
<Stuff of my own deleted...>

OK, i've found something out, maybe i'm just being stupid and missed
something.  I've found out that the file dirent.h has the following struct
definition:
struct dirent {
        u_long  d_fileno;               /* file number of entry */
        u_short d_reclen;               /* length of this record */
        u_short d_namlen;               /* length of string in d_name */
#ifdef _POSIX_SOURCE
        char    d_name[255 + 1];        /* name must be no longer than this */
#else
#define MAXNAMLEN       255
        char    d_name[MAXNAMLEN + 1];  /* name must be no longer than this */
#endif
};

the types "u_long" and "u_short" aren't valid in NetBSD.  they're really
unsigned long" and "unsigned short". (Well, at least when I changed them to
unsigned..., it worked...but I could be completely wrong.)

Why is this?  Am i missing something here?  Another header perhaps?

thanx...alex...
--
Alex Tang  ---  ALTITUDE@UMICH.EDU...USERW00Y@UMICHUM.BITNET
-----------+    U of M, SNRE: Student and Computer Consultant II,
PGP on req.|    ITD/CSS Consultant, Short asian with long hair :)