Linux 2.0.26 minor bug during "make dep"

M Sweger (mikesw@whiterose.net)
Sun, 24 Nov 1996 17:43:41 -0500 (EST)


Hello linux-developers,

I recently downloaded and built linux 2.0.26. There is a
minor bug during the make but it isn't serious, just annoying.
It also was in linux 2.0.24/25 too.
The bug only occurs if a "make mrproper" is done followed by a
"make menuconfig" then a "make dep". If a "make clean" and "make dep" is
done without doing the "make mrproper" the bug isn't visible.

The bug has to do with the redefinition of the MAP_FILE.
This could be corrected by surrounding the MAP_FILE with #ifndef MAP_FILE
The value assigned is the same, one is "0" and the other "0x00".

Here is the error that I see during "make dep" after a "make mrproper".

THIS IS BEFORE IT ENTERS THE /usr/src/linux/arch/i386/boot directory
In file included from scripts/mkdep.c:9:
/usr/include/sys/mman.h:11: warning: `MAP_FILE` redefined
/usr/include/asm/mman.h:29: warning: this is the location of the
previous definition

One definition is 0 the other 0x00
MAP_ANON would cause the same problem but it doesn't since one include
will do an #ifndef MAP_ANON. Perhaps the same could be done for the MAP_FILE.

Note: the the /usr/include/asm is symbolically linked to the linux
source tree as it is supposed to be.

Here is a diff dump between the "sys" and "asm" mman.h include file.

1,2c1,2
< #ifndef _SYS_MMAN_H
< #define _SYS_MMAN_H

---
> #ifndef __I386_MMAN_H__
> #define __I386_MMAN_H__
4,6c4,29
< #include <features.h>
< #include <sys/types.h>
< #include <linux/mman.h>
---
> #define PROT_READ	0x1		/* page can be read */
> #define PROT_WRITE	0x2		/* page can be written */
> #define PROT_EXEC	0x4		/* page can be executed */
> #define PROT_NONE	0x0		/* page can not be accessed */
> 
> #define MAP_SHARED	0x01		/* Share changes */
> #define MAP_PRIVATE	0x02		/* Changes are private */
> #define MAP_TYPE	0x0f		/* Mask for type of mapping */
> #define MAP_FIXED	0x10		/* Interpret addr exactly */
> #define MAP_ANONYMOUS	0x20		/* don't use a file */
> 
> #define MAP_GROWSDOWN	0x0100		/* stack-like segment */
> #define MAP_DENYWRITE	0x0800		/* ETXTBSY */
> #define MAP_EXECUTABLE	0x1000		/* mark it as a executable */
> #define MAP_LOCKED	0x2000		/* pages are locked */
> 
> #define MS_ASYNC	1		/* sync memory asynchronously */
> #define MS_INVALIDATE	2		/* invalidate the caches */
> #define MS_SYNC		4		/* synchronous memory sync */
> 
> #define MCL_CURRENT	1		/* lock all current mappings */
> #define MCL_FUTURE	2		/* lock all future mappings */
> 
> /* compatibility flags */
> #define MAP_ANON	MAP_ANONYMOUS
> #define MAP_FILE	0
8,30c31
< #ifndef MAP_ANON
< #define MAP_ANON	MAP_ANONYMOUS	   /* idem */
< #endif
< #define MAP_FILE	0x00	   /* The 'normal' way: mapped from file */
< 
< __BEGIN_DECLS
< 
< extern caddr_t mmap __P((caddr_t __addr, size_t __len,
< 		int __prot, int __flags, int __fd, off_t __off));
< extern int munmap __P((caddr_t __addr, size_t __len));
< extern int mprotect __P ((caddr_t __addr, size_t __len, int __prot));
< 
< extern int msync __P((caddr_t __addr, size_t __len, int __flags));
< 
< extern int mlock __P((caddr_t __addr, size_t __len));
< extern int munlock __P((caddr_t __addr, size_t __len));
< 
< extern int mlockall __P((int __flags));
< extern int munlockall __P((void));
< 
< __END_DECLS
< 
< #endif /* _SYS_MMAN_H */
---
> #endif /* __I386_MMAN_H__ */

Again nothing serious. Just annoying.

By the way. Did something happen to the blue color in make menuconfig? Mine is black instead of blue in linux 2.0.26 when it was blue in linux 2.0.24/25.

TIA.

Mike mikesw@whiterose.net