[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with zmailer 2.99.27 and Linux



i changesd scheduler/scheduler.c to excatly like you have below in the 
paste, but i now get the fullowing error;

scheduler.c: In function `init_timeserver':
scheduler.c:1717: `MAPSIZE' undeclared (first use this function)
scheduler.c:1717: (Each undeclared identifer is reported only once
scheduler.c:1717: for each funtion it appears in.)
make[1]: *** [sheduler.o] Error1

we are running on linux with elf bin's if this make a diff.

thanks again



>   Yeah, around line 1710 at  scheduler/scheduler.c  I have now
>   code attached below (this is cut&paste from xterm, tabs are
>   converted to spaces..)   Another trouble child appeared to
>   be  mailq.c,  which uses   SCHEDULERDIR  macro.  Replace with
>   TRANSPORTDIR -- propably that is at my post27 source only,
>   where I removed the SCHEDULERDIR from  include/mail.h -file.
> 
>   This is working at Solaris 2.5, Linux 1.99.4, DEC OSF/1 3.2D,
>   and SunOS 4.1.4  :-)
> 
> 	/Matti Aarnio <mea@utu.fi> <mea@nic.funet.fi>
> 
> -----------------------------------------------
> struct timeserver *timeserver_segment = NULL;
> static void init_timeserver()
> {
>         int ppid;
> 
> #if !defined(MAP_ANONYMOUS) || defined(__linux__)
>         /* must have a file ? (SunOS 4.1, et.al.) */
>         int fd = -1;
>         char blk[1024];
>         int i;
>         FILE *fp = tmpfile();
> 
>         if (fp) {
>           fd = dup(fileno(fp));
>           fclose(fp);
>         }
>         if (fd < 0) return; /* Brr! */
> 
>         memset(blk,0,sizeof(blk));
>         for (i=0; i < MAPSIZE; i += sizeof(blk))
>           write(fd,blk,sizeof(blk));
>         lseek(fd,0,0);
> 
> #ifndef MAP_FILE
> # define MAP_FILE 0 /* SunOS 4.1 does not have this */
> #endif
>         timeserver_segment = (void*)mmap(NULL, MAPSIZE, PROT_READ|PROT_WRITE,
>                                          MAP_FILE|MAP_SHARED, fd, 0);
>         close(fd);
>        
> #else
> #ifndef MAP_VARIABLE
> # define MAP_VARIABLE 0
> #endif
>         /* This MAP_ANONYMOUS does work at DEC OSF/1 ... */
>         timeserver_segment = (void*)mmap(NULL, MAPSIZE, PROT_READ|PROT_WRITE,
>                                          MAP_VARIABLE|MAP_ANONYMOUS|MAP_SHARED,
> -----------------------------------------------
>