Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!udel!haven.umd.edu!mimsy!ra.src.umd.edu!preetham From: preetham@ra.src.umd.edu (Preetham Gopalaswamy) Newsgroups: comp.sys.hp Subject: Problem with Message-ID: <35213@mimsy.umd.edu> Date: 4 Jun 91 18:19:33 GMT Sender: news@mimsy.umd.edu Reply-To: preetham@ra.src.umd.edu (Preetham Gopalaswamy) Organization: Neural Systems Lab., Univ. of Maryland, College Park, MD 20742 Lines: 118 I am trying to compile the MDQS spooling system for my HP 300's and 800's and run into a problem at the compile stage in a program at the routine "readdir". I vaguely recall somebody on this group mentioning some sort of problem with using , some incompatibility between SYSV and BSD. Does anybody remember what the problem was. I will include the portion of the code where the problem is faced and the compiler generated errors. Any help would be highly appreciated. I checked the definition of the structure "dirent" and it seemed like this should work. I could have missed something obvious though. Preetham Gopalaswamy /* * M U L T I - D E V I C E Q U E U E I N G S Y S T E M * * D R E C O V E R . C * * Douglas P. Kingston III * * Part of the MDQS Daemon */ #include #include "queue.h" /* Includes */ #include #ifdef DIRBLKSIZ /* 4BSD flavor assumed */ #define dirent direct #endif extern char *Newprefix; extern char *Qcntrldir; extern int Debug; extern int Waveoff; /* * R E C O V E R ( ) * * This function is called once when the daemon is started up. * All jobs in the queue are enrolled into the daemons queues * unless there is not enough space in which case, they are linked * into the new directory which will cause them to be read later. */ recover() { register struct dirent *dirp; register DIR *dirf; char newname[PATHSIZ]; /* * Read in all the requests in the control directory. * If we run out of space, then just start linking * to the Newdir so the daemon will accept them when * it has space. */ recover() { register struct dirent *dirp; register DIR *dirf; char newname[PATHSIZ]; /* * Read in all the requests in the control directory. * If we run out of space, then just start linking * to the Newdir so the daemon will accept them when * it has space. */ if(( dirf = opendir( Qcntrldir )) == NULL ) { complain( "recover() cannot open %s, recovery aborted.", Qcntrldir ); return; } while(( dirp = readdir( dirf )) != NULL ) { <------- LINE 51 if( dirp->d_name[0] != 'Q') <------- LINE 52 continue; debug("Recovering %s.", dirp->d_name); <------- LINE 55 if( ! Waveoff ) { enroll( dirp->d_name ); <------- LINE 57 rmreq( Newprefix, dirp->d_name, QUIET ); } else { /* The daemon's queues are full, link to Newdir */ sprintf(newname, "%s/%s", Newprefix, dirp->d_name); if( link( dirp->d_name, newname ) && Debug ) debug("Link failed (%s, %s).", newname, sys_errlist[errno] ); } } closedir( dirf ); } ###################################################################### The compiler generated the following errors : cc -c -O -I. -I../h ../src/drecover.c "../src/drecover.c", line 51: warning: incorrect structure pointer combination "../src/drecover.c", line 52: undefined structure or union "../src/drecover.c", line 52: warning: incorrect member use: d_name "../src/drecover.c", line 55: undefined structure or union "../src/drecover.c", line 55: warning: incorrect member use: d_name "../src/drecover.c", line 57: undefined structure or union "../src/drecover.c", line 57: warning: incorrect member use: d_name "../src/drecover.c", line 58: undefined structure or union "../src/drecover.c", line 58: warning: incorrect member use: d_name "../src/drecover.c", line 61: undefined structure or union "../src/drecover.c", line 61: warning: incorrect member use: d_name "../src/drecover.c", line 62: undefined structure or union "../src/drecover.c", line 62: warning: incorrect member use: d_name *** Error code 1 Stop.