I've been trying (unsuccessfully so far) to get LPRng to run on DigitalUNIX 4.0F.
The first problem I ran into was that it would not compile. The patch attached is my humble attempt to fix that problem by moving the flock definition in portable.h out of #ifdef SUNOS and into an #ifndef HAVE_FLOCK_DEF, since the latter is provided by autoconf. It seems like that might be a better way to go, anyway, but you guys know the code better. Anyway, now it compiles, but it still doesn't work quite right. More on that later. --Alan
diff -ur LPRng-3.8.3/src/include/portable.h LPRng-3.8.3-patched/src/include/portable.h --- LPRng-3.8.3/src/include/portable.h Mon Dec 3 17:08:23 2001 +++ LPRng-3.8.3-patched/src/include/portable.h Tue Dec 18 15:09:37 2001 @@ -732,7 +732,6 @@ extern void endgrent( void ); extern int fflush( FILE *stream ); extern int fclose( FILE *stream ); -extern int flock( int fd, int operation ); extern int fprintf(FILE *, const char *, ...); extern int fputs( const char *, FILE *stream ); extern int fstat(int fd, struct stat *buf ); @@ -786,6 +785,10 @@ extern int vprintf(FILE *, const char *, va_list ap); #endif + +#ifndef HAVE_FLOCK_DEF +extern int flock( int fd, int operation ); +#endif #ifdef SOLARIS extern int setreuid( uid_t ruid, uid_t euid ); Only in LPRng-3.8.3-patched/src/include: portable.h~
