sysV 2.0 vs 3.1 compatibility?

walquist at s.cs.uiuc.edu walquist at s.cs.uiuc.edu
Fri Dec 2 06:26:00 AEST 1988


I am having trouble with a program (namely, CAL) that I'm attempting
to compile on Unix sysV version 3.1 software.  It works when compiled on
version 2.0.4, but a call to fopen() in a 3.1 executable causes the program
to die (or be killed; the error message simply reads "Killed").

Background:
  the compiler used is "dmdcc", a compiler for software developed for the 
  AT&T 5620 (the blit).  The same DMD Application Development Uilities
  exist on each machine (2.0 and 3.1).

  When I compile this program with dmdcc and run it (using an existing file
  "temp"), it exits with "Killed." and no other output.

  #include <blitio.h>
  main() {

     FILE *fp;
     int c;

     fp = fopen("temp","r");
     while ((c=getc(fp)) != EOF) putc(stdout);
     fclose(fp);
  }

  When I compile the same program with cc (replacing <blitio.h> with <stdio.h>),
  everything is fine.

Also:
  these errors come up for 3.1 compiles, but not 2.0.4 compiles:

  /usr/DMD/include/jerqproc.h: 103: extra tokens (ignored) after directive
  /usr/DMD/include/mpx.h: 135: extra tokens (ignored) after directive
  /usr/DMD/include/font.h: 43: extra tokens (ignored) after directive

  What is a token? a directive?

-Christopher



More information about the Comp.lang.c mailing list