From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,6152301aee98ab34,start X-Google-Attributes: gid1164f8,public X-Google-Thread: 1014db,6152301aee98ab34,start X-Google-Attributes: gid1014db,public X-Google-ArrivalTime: 1993-04-28 07:17:47 PST Xref: gmd.de comp.sys.dec:7336 comp.lang.c:20696 Newsgroups: comp.sys.dec,comp.lang.c Path: gmd.de!newsserver.jvnc.net!howland.reston.ans.net!usc!cs.utexas.edu!uunet!nih-csl!freud.nia.nih.gov!howardy From: howardy@freud.nia.nih.gov (Howard Wai-Chun Yeung) Subject: how to get around memory mapped file in Ultrix Message-ID: <1993Apr28.140912.4403@alw.nih.gov> Sender: postman@alw.nih.gov (AMDS Postmaster) Organization: (Natl. Institutes of Health, Bethesda, MD) Date: Wed, 28 Apr 1993 14:09:12 GMT I post my previous question about the c compiler problem. I get the following response from a DEC person. >>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); >> ------------------------------------------------------------------------------------------------ >>--^ >The warning is likely due to the fact that mmap is declared as returning >caddr_t on SGI and not at all under MIPS Ultrix (which I assume your using, >because on DEC OSF/1 Alpha it *is* declared as returning caddr_t). >>My program doesn't run on DEC. >> >>Do anyone know why? >What are you trying to mmap ? If that's a file, that doesn't work >at all under Ultrix, because Ultrix doesn't have memory mapped files. That's not a good news to me. Actually, the program isn't written by me. I guess the original author is trying to map a protion of memeory to an output file. Is there an equivalent function in Ultrix c which do the same thing, or any ways to get around this? On SGI the prototype of the function is: extern void *mmap(void *, int, int, int, int, off_t); Appreciate your help. Howard