changeset 26318:7e0162c50768

Move decision about whether or not to compile osdep/mmap_os2.c to configure.
author diego
date Tue, 08 Apr 2008 17:31:25 +0000
parents 955f4b8ac094
children b90151a7dcbb
files configure osdep/Makefile
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Tue Apr 08 17:06:25 2008 +0000
+++ b/configure	Tue Apr 08 17:31:25 2008 +0000
@@ -3054,6 +3054,7 @@
   _def_mman='#define HAVE_SYS_MMAN_H 1'
 else
   _def_mman='#undef HAVE_SYS_MMAN_H'
+  os2 && _need_mmap=yes
 fi
 echores "$_mman"
 
@@ -7732,6 +7733,7 @@
 
 NEED_GETTIMEOFDAY    = $_need_gettimeofday
 NEED_GLOB    = $_need_glob
+NEED_MMAP    = $_need_mmap
 NEED_SETENV  = $_need_setenv
 NEED_SHMEM   = $_need_shmem
 NEED_STRSEP  = $_need_strsep
--- a/osdep/Makefile	Tue Apr 08 17:06:25 2008 +0000
+++ b/osdep/Makefile	Tue Apr 08 17:31:25 2008 +0000
@@ -7,6 +7,7 @@
 
 SRCS_COMMON-$(NEED_GETTIMEOFDAY)     += gettimeofday.c
 SRCS_COMMON-$(NEED_GLOB)             += glob-win.c
+SRCS_COMMON-$(NEED_MMAP)             += mmap-os2.c
 SRCS_COMMON-$(NEED_SETENV)           += setenv.c
 SRCS_COMMON-$(NEED_SHMEM)            += shmem.c
 SRCS_COMMON-$(NEED_STRSEP)           += strsep.c
@@ -26,9 +27,6 @@
 endif
 ifeq ($(TARGET_OS),OS/2)
 getch = getch2-os2.c
-ifneq ($(HAVE_SYS_MMAN_H),yes)
-SRCS_COMMON += mmap-os2.c
-endif
 endif
 SRCS_COMMON += $(timer)
 SRCS_COMMON += $(getch)