[comp.text.tex] request help with web2c build problems

wargaski@ils.nwu.edu (Robert E. Wargaski Jr.) (06/05/90)

I have had a few errors in building web2c which are bothersome at
best, and I am worried about using the compiled programs.  
Following are excerpts from the `make':

**********

gcc -g -O  -I.. -c dvitype.c
dvitype.c: In function opendvifile:
dvitype.c:214: warning: argument passing between incompatible pointer types
dvitype.c:221: warning: argument passing between incompatible pointer types
dvitype.c:221: warning: argument passing between incompatible pointer types
dvitype.c: In function opentfmfile:
dvitype.c:243: warning: argument passing between incompatible pointer types
dvitype.c:243: warning: argument passing between incompatible pointer types

gcc -g -O  -I.. -c pooltype.c
pooltype.c: In function main_body:
pooltype.c:171: warning: argument passing between incompatible pointer types
pooltype.c:172: warning: argument passing between incompatible pointer types
pooltype.c:172: warning: argument passing between incompatible pointer types

gcc -g -O  -Dlink=link_array -I.. -c gftodvi.c
gftodvi.c: In function opengffile:
gftodvi.c:355: warning: assignment of pointer from integer lacks a cast
gftodvi.c:355: warning: assignment of pointer from integer lacks a cast
gftodvi.c: In function opentfmfile:
gftodvi.c:387: warning: assignment of pointer from integer lacks a cast
gftodvi.c:387: warning: assignment of pointer from integer lacks a cast
gftodvi.c: In function opendvifile:
gftodvi.c:401: warning: assignment of pointer from integer lacks a cast
gftodvi.c:401: warning: assignment of pointer from integer lacks a cast

gcc -g -O  -Dlink=link_array -I.. -c gftopk.c
gftopk.c: In function opengffile:
gftopk.c:205: warning: assignment of pointer from integer lacks a cast
gftopk.c:205: warning: assignment of pointer from integer lacks a cast
gftopk.c: In function openpkfile:
gftopk.c:280: warning: assignment of pointer from integer lacks a cast
gftopk.c:280: warning: assignment of pointer from integer lacks a cast

gcc -g -O  -Dlink=link_array -I.. -c mft.c
mft.c: In function initialize:
mft.c:425: warning: assignment of pointer from integer lacks a cast
mft.c:425: warning: assignment of pointer from integer lacks a cast
mft.c: In function openinput:
mft.c:493: warning: assignment of pointer from integer lacks a cast
mft.c:493: warning: assignment of pointer from integer lacks a cast
mft.c:494: warning: assignment of pointer from integer lacks a cast
mft.c:494: warning: assignment of pointer from integer lacks a cast
mft.c:505: warning: assignment of pointer from integer lacks a cast
mft.c:505: warning: assignment of pointer from integer lacks a cast

gcc -g -O  -I.. -c bibtex.c
bibtex.c: In function predefcertainstrings:
bibtex.c:2136: warning: argument passing of pointer from integer lacks a cast
bibtex.c:2137: warning: argument passing of pointer from integer lacks a cast

**********

The bibtex warnings were by far the most severe:  there were about 143
of the `assignment of pointer from integer lacks a cast' warnings,
along with a few `argument passing between incompatible pointer
types', just for kicks :-)

Following is the site.h file which I modified for our use:  I'm
building this on a SPARCstation 1 (running SunOS 4.0.3c) with gcc.

**********

/* Master configuration file for WEB to C.  Almost all the definitions
   are wrapped with #ifndef's, so that you can override them from the
   command line, if you want to.  */

/* Modified for ILS use by Rob Wargaski (REW), 8 May 90 */

#ifndef __WEB2C_SITE_H
#define __WEB2C_SITE_H

/* Define if you're running under 4.2 or 4.3 BSD.  */
#ifndef BSD
#define	BSD
#endif

/* Define if you're running under System V.  */
#ifndef SYSV
#undef	SYSV
#endif

/* Define if you're running under MS-DOS with Microsoft C.  */
#ifndef MS_DOS
#undef	MS_DOS
#endif

/* Define this if the system will be compiled with an ANSI C compiler,
   and never with a non-ANSI compiler.  It changes web2c so that it
   produces ANSI C as its output.  This is a good idea, but you don't
   necessarily gain anything in the production programs by doing it.  */
#ifndef ANSI
#define	ANSI
#endif

/* REW:  I believe gcc is an ANSI C compiler */

/* Define these according to your local setup.  */
#define	TEXINPUTS	".:/usr/local/lib/tex/inputs"
#define	TEXFONTS	".:/usr/local/lib/tex/fonts"
#define	TEXFORMATS	".:/usr/local/lib/tex/inputs"
#define	TEXPOOL		".:/usr/local/lib/tex"
#define	MFBASES		".:/usr/local/lib/mf/bases"
#define	MFINPUTS	".:/usr/local/lib/mf/inputs"
#define	MFPOOL		".:/usr/local/lib/mf"

/* BibTeX search path for .bib files.  TEXINPUTS is used by BibTeX to
   search for .bst files.  */
#define	BIBINPUTS	".:/usr/local/lib/tex/bib"

/* Metafont window support: More than one may be defined, as long as you
   don't try to have both X10 and X11 support (because there are
   conflicting routine names in the libraries).  After you've defined
   these, make sure to update the top-level Makefile accordingly.  Also,
   if you want X11 support, see the `Online output from Metafont'
   section in ./README before compiling.  */
#undef	SUNWIN			/* SunWindows support. */
#undef	X10WIN			/* X Version 10 support. */
#define	X11WIN			/* X Version 11 support. */
#undef	HP2627WIN		/* HP 2627 support. */
#undef	TEKTRONIXWIN		/* Tektronix 4014 support. */

#if defined(X10WIN) && defined(X11WIN)
sorry
#endif

/* Default editor command string: %d expands to the line number where
   TeX or Metafont found an error and %s expands to the name of the
   file.  The environment variables TEXEDIT and MFEDIT override this.  */
#define	EDITOR	"/usr/local/bin/emacs +%d %s"

/* Define to be the return type of your signal handlers.  POSIX says it
   should be `void', but some older systems want `int'.  Check your
   <signal.h> include file if you're not sure.  */
#ifndef SIGNAL_HANDLER_RETURN_TYPE
#define SIGNAL_HANDLER_RETURN_TYPE void
#endif

/* REW:  Well, let's try `void' */

/* The type `glueratio' should be a floating point type which won't
   unnecessarily increase the size of the memoryword structure.  This is
   the basic requirement.  On most machines, if you're building a
   normal-sized TeX, then glueratio must probably meet the following
   restriction: sizeof(glueratio) <= sizeof(integer).  Usually, then,
   glueratio must be `float'.  But if you build a big TeX, you can (on
   most machines) and should make it `double' to avoid loss of precision
   and conversions to and from double during calculations.  (All this
   also goes for Metafont.)  Furthermore, if you have enough memory, it
   won't hurt to have this defined for running the trip/trap tests.  */
typedef double glueratio;

/* REW:  I defined it as `double' to allow for a -big- TeX */

/* Define this if you want TeX to be compiled with local variables
   declared as `register'.  On SunOS 3.2 and 3.4 (at least), compiling
   with cc, this will cause problems.  If you're using gcc or the SunOS
   4.x compiler, and compiling with -O, register declarations are
   ignored, so there is no point in defining this.  */
#ifndef REGFIX
#undef	REGFIX
#endif

/* If the type `int' is at least 32 bits (including a sign bit), this
   symbol should be #undef'd; otherwise, it should be #define'd.  If
   your compiler uses 16-bit int's, arrays larger than 32K may give you
   problems, especially if indices are automatically cast to int's.  */
#ifndef SIXTEENBIT
#undef	SIXTEENBIT
#endif

/* Our character set is 8-bit ASCII unless NONASCII is defined.  For
   other character sets, make sure that first_text_char and
   last_text_char are defined correctly (they're 0 and 255,
   respectively, by default).  In the *.defines files, change the
   indicated range of type `char' to be the same as
   first_text_char..last_text_char, `#define NONASCII', and retangle and
   recompile everything.  */
#ifndef NONASCII
#undef	NONASCII
#endif

/* The type `schar' should be defined here to be the smallest signed
   type available.  ANSI C compilers may need to use `signed char'.  If
   you don't have signed characters, then define schar to be the type
   `short'.  */

typedef char schar;

/* REW:  We'll try char */

/* The type `integer' must be a signed integer capable of holding at
   least the range of numbers (-2^31)..(2^32-1).  The ANSI C
   standard says that `long' meets this requirement, but if you don't
   have an ANSI C compiler, you might have to change this definition.  */
typedef long integer;

/* Define MAXPATHLENGTH to be the maximum number of characters in a
   search path.  This is used to size the buffers for the environment
   variables.  It is good to be quite generous here.  */
#ifndef MAXPATHLENGTH
#define	MAXPATHLENGTH	5000
#endif

#include "defaults.h"

#endif /* __WEB2C_H */


**********

If anyone has any insight about why these warnings are occurring, I'd very
much appreciate any help.


Robert E. Wargaski Jr.			 This is stupid. -- Vila
wargaski@[acns,eecs,ils].nwu.edu	 When did that ever stop us. -- Avon
ACNS DSS, Northwestern University			Moooo!