XV Viewer Compilation Error **
young at hamavnet
young at hamavnet
Sat Feb 23 11:08:32 AEST 1991
Hello,
I am trying to get xv gif program to compile on my Unix System V system and
encounter the following error:
222BY/usr/briany/xgif $ >make
cc -c -O -DDIRENT xvdir.c
C-88000 1.8.5m9 Copyright (C) 1983,1984,1985,1986,1987,1988,1989,1990 Green
Hills S
oftware, Inc. All rights reserved.
"xvdir.c", line 368: Undefined member: d_namlen
"xvdir.c", line 368: Type mismatch
*** Error code 1
Stop.
Here is a look at the section of code:
}
i=0;
while ( (dp = readdir(dirp)) != NULL) {
if (strcmp(dp->d_name, ".")==0 || strcmp(dp->d_name, "..")==0) {
/* skip over '.' and '..' */
}
else {
**> dirnames[i] = (char *) malloc(dp->d_namlen + 2); /* +2=filetype + '\0'*/
if (!dirnames[i]) FatalError("malloc error while reading directory");
strcpy(dirnames[i]+1, dp->d_name);
/* figure out what type of file the beastie is */
dirnames[i][0] = C_REG; /* default to normal file, if lstat fails */
if (lstat(dirnames[i]+1, &st)==0) {
ftype = st.st_mode & S_IFMT; /* mask off uninteresting bits */
if (ftype == S_IFIFO) dirnames[i][0] = C_FIFO;
else if (ftype == S_IFCHR) dirnames[i][0] = C_CHR;
else if (ftype == S_IFDIR) dirnames[i][0] = C_DIR;
else if (ftype == S_IFBLK) dirnames[i][0] = C_BLK;
else if (ftype == S_IFLNK) dirnames[i][0] = C_LNK;
else if (ftype == S_IFSOCK) dirnames[i][0] = C_SOCK;
}
else {
/* fprintf(stderr,"problems 'stat-ing' files\n");*/
dirnames[i][0] = C_REG;
}
i++;
}
}
Could anyone help. I can not find this in any files to help me understand what
type of symbol this is.
Thank you
--
Brian A. Young | young at hamavnet.com | Who gives a rip!
Technical Marketing Services | hplabs!mcdapps!mcdhwd!briany |
Avnet Computer | fax: 213 280 3944 |
More information about the Comp.unix.questions
mailing list