%% /u/sy/beebe/tex/bibindex/2-6/PROBLEMS, Thu Oct  7 16:18:41 1993
%% Edit by Nelson H. F. Beebe <beebe@plot79.math.utah.edu>

This file records porting problems, in reverse chronological order.

------------------------------------------------------------------------
[07-Oct-1993]	DEC Alpha OpenVMS 1.5, cc

PROBLEM: The C compiler flags lib$screen_info() as unknown, even
though it has existed for at least a decade on VAX VMS.

WORKAROUND: Add conditional code to biblook.c for this system to set
the screen size to 24x80.
------------------------------------------------------------------------
[07-Oct-1993]	Sun SPARC, SunOS 4.1.3, C++

PROBLEM: The C++ macro preprocessor is not Standard conformant, and
erroneously expands parenthesized macro names, preventing compilation
of all of the .c files in the bibindex distribution.  This problem
does not exist under Solaris 2.x.

WORKAROUND: Use acc, gcc, or g++ instead.
------------------------------------------------------------------------
[06-Oct-1993]	HP 9000/735, HP-UX 9.0, C++

PROBLEM: The C++ run-time library is missing a version of mmap() et al.

WORKAROUND: In memio.c, bracket the include of <sys/mman.h> with 
extern "C" {...} for that system.
------------------------------------------------------------------------
[06-Oct-1993]	DEC VAX, VMS 5.4-2

PROBLEM: The VMS C compiler issues warnings about references to
undefined preprocessor symbols, instead of the UNIX style of silently
treating them as zero.

WORKAROUND: Supply explicit definitions in biblook.c of all non-VMS 
preprocessor symbols used in bibindex.c, biblook.h, and biblook.c.
------------------------------------------------------------------------
[06-Oct-1993]	DEC VAX, VMS 5.4-2

PROBLEM: In biblook.h, <sys/types.h> and <sys/stat.h> are stored one
level higher in the file system, and <unistd.h> is not available.

WORKAROUND: Provide a preprocessor conditional to include <types.h>
and <stat.h> under VMS.
------------------------------------------------------------------------
[06-Oct-1993]	DEC VAX, VMS 5.4-2

PROBLEM: In bibindex.c, the VMS qsort() function passes NULL pointers
to the comparison function, resulting in a program-terminating address
violation.  This problem does NOT exist with the DEC Alpha OpenVMS 1.5
qsort().

WORKAROUND: Supply an alternative sorting function (borrowed from my
DVI driver development).  The one provided is a shellsort
implementation, but that doesn't matter to bibindex.  It is used for
both VAX and Alpha VMS versions of bibindex, even though it isn't
needed on the Alpha.
------------------------------------------------------------------------
[06-Oct-1993]	DEC VAX, VMS 5.4-2

PROBLEM: In biblook.c, tempnam() is not available.  tmpnam() does not
seem to work properly on this systems

WORKAROUND: Define tempnam() to expand to a fixed name, "biblook.tmp",
providing a simple implementation of strdup() for convenience.
------------------------------------------------------------------------
[06-Oct-1993]	DEC VAX, VMS 5.4-2

PROBLEM: In biblook.c, unlink() is not available.

WORKAROUND: Redefine unlink() to expand to the VMS name delete(); note
that this will fail with a C++ compiler, because `delete' is a C++
reserved word.
------------------------------------------------------------------------
[06-Oct-1993]	DEC VAX, VMS 5.4-2

PROBLEM: In biblook.c, a file pager is needed in function PrintResults().

WORKAROUND: Use `type/page' unless the user has defined an alternative
via the logical name PAGER.  This works, but does not allowing
searching, paging backward, asking for help on the pager, or quitting
the pager prematurely.
------------------------------------------------------------------------
[22-Sep-1993]	IBM PS/2, AIX 2.1, CC

PROBLEM: Errors in the C++ header files result in undefined references
to fwrite(), ftell(), htons(), and htonl().

WORKAROUND: Choose a different compiler.
------------------------------------------------------------------------
[22-Sep-1993]	IBM PS/2, AIX 2.1, gcc 1.39

PROBLEM: Conflicts in the gcc header files result in compilation 
errors. 

WORKAROUND: Update the compiler; this one is very old. 
------------------------------------------------------------------------
[22-Sep-1993]	IBM PS/2, AIX 2.1, cc (MetaWare High C Compiler R2.2g)

PROBLEM: bibindex and biblook compile and link successfully with "make
ibm-ps2", but the resulting executable for bibindex will not run
correctly.  A debug session reveals that argc and argv are corrupted
on entry to main()!  A pox upon this system.  I give up on it!

WORKAROUND: None.
------------------------------------------------------------------------
[21-Sep-1993]	NeXT Mach 3.0 with c++

PROBLEM: mmap() and munmap() are absent from the run-time library.

WORKAROUND: Build without memory-mapped I/O.
------------------------------------------------------------------------
[21-Sep-1993]	Silicon Graphics Indigo, IRIX 4.0.3, lcc

PROBLEM: bibindex.c and biblook.c cannot be compiled with lcc, because
it will not accept unsigned char bitfields in <sys/wait.h>.

PROBLEM: When memio is compiled with lcc, it gets a run-time
segmentation fault in the call "(void)memcpy(buf,
(void*)memfiles_[mf].pos, nbytes)" in mfread() during the third test.
Unfortunately, lcc doesn't produce symbol tables that dbx or gdb can
read, so local variables are inaccessible.  I'm inclined to believe that
this may be a compiler code generation error.

WORKAROUND: Avoid lcc for this program; use cc, CC, gcc or g++ instead.
------------------------------------------------------------------------
[21-Sep-1993]	IBM PS/2, AIX 2.1, cc (MetaWare High C Compiler R2.2g)

PROBLEM: A command-line option like  -DMOREPATH=\"/usr/local/bin/less\"
produces an entry in a compiler temporary file

#undef MOREPATH=\"/usr/local/bin/less\"

which aborts the compilation.

WORKAROUND: Either omit compile-time definition of MOREPATH and MORE,
or insert their definitions in biblook.h.  The default of
/usr/ucb/more IS available on this system, so no great harm is done.
The ibm-ps2 convenience target in the Makefile takes care of this.
------------------------------------------------------------------------
[21-Sep-1993]	DECstation 5000, ULTRIX 4.3, lcc

PROBLEM: memio can be compiled and linked with lcc, but mfopen() always
fails because mmap() always returns failure.

PROBLEM: bibindex.c and biblook.c cannot be compiled with lcc, because
it will not accept unsigned char bitfields in <sys/wait.h>.

WORKAROUND: Avoid lcc for this program; use gcc or g++ instead, and
use standard I/O instead of memory-mapped I/O.
------------------------------------------------------------------------
[13-Sep-1993]	HP 9000/375, BSD 4.3 UNIX, CC

PROBLEM: The C++ library on this system is missing a version of
waitpid(), so biblook cannot be built.

WORKAROUND: Use C (gcc or cc) instead.
------------------------------------------------------------------------
[13-Sep-1993]	IBM 3090-600S/VF AIX 2.1

PROBLEM: Compilation with C++ fails because the C++ runtime library
	 lacks versions of fread(), ftell(), and waitpid(), and a
	 declaration of fwrite().

WORKAROUND: Use C (cc) instead.
------------------------------------------------------------------------
[13-Sep-1993]	NeXT Mach 3.0 with g++ 2.4.5

PROBLEM: bibindex builds fine on this system, but biblook cannot be built
because the C++ runtime library lacks C++ versions of fork(),
execlp(), execl(), and unlink().  Their declarations should be
bracketed by

extern "C" {...} 

in /usr/include/bsd/libc.h, so that the C library equivalents can be
used.

WORKAROUND: use C (gcc or cc) or Objective C (cc -ObjC) instead.
------------------------------------------------------------------------
