Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
* problem with the risc c compiler on DEC
@ 1993-04-27 16:25 Howard Wai-Chun Yeung
  0 siblings, 0 replies; only message in thread
From: Howard Wai-Chun Yeung @ 1993-04-27 16:25 UTC (permalink / raw)


I compile a c program using a SGI ansi c compiler and
a DEC risc c compiler.

I my program, I have the following statements:
~
~
#include <sys/file.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/mman.h>

~
~
caddr_t inmapped=NULL;
caddr_t outmapped=NULL;

outmapped=mmap((caddr_t)0,(dimx*dimy*dimz*bits)-1, PROT_READ|PROT_WRITE , MAP_SHARED, fd, (off_t)0);

~
~
inmapped=mmap((caddr_t)0, (dimx*dimy*dimz*bits)-1 , PROT_READ , MAP_SHARED , fd, (off_t)0);

~
~
dimx, dimy, dimz and bits are integers.
On the SGI c compiler, the compling is OK.
But on the DEC compiler, I get the following warning message:
ccom: Warning: genimg.c, line 184: illegal combination of pointer and integer, op =
       outmapped=mmap((caddr_t)0,(dimx*dimy*dimz*bits)-1, 0x1           |0x2             , 1         ,
 fd, (off_t)0);
      ------------------------------------------------------------------------------------------------
-----------------^
ccom: Warning: genimg.c, line 218: illegal combination of pointer and integer, op =
       inmapped=mmap((caddr_t)0, (dimx*dimy*dimz*bits)-1 , 0x1           , 1             , fd, (off_t)
0);
      ------------------------------------------------------------------------------------------------
--^


My program doesn't run on DEC.

Do anyone know why?
If you like the whole copy of the program, I will more than 
glad to send you one.  It has about 200 lines of code.


Howard.




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1993-04-27 16:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1993-04-27 16:25 problem with the risc c compiler on DEC Howard Wai-Chun Yeung

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox