emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/gc/include/private/gcconfig.h [Boehm-GC]


From: Dave Love
Subject: [Emacs-diffs] Changes to emacs/gc/include/private/gcconfig.h [Boehm-GC]
Date: Mon, 16 Jun 2003 11:41:53 -0400

Index: emacs/gc/include/private/gcconfig.h
diff -c emacs/gc/include/private/gcconfig.h:1.2.2.2 
emacs/gc/include/private/gcconfig.h:1.2.2.3
*** emacs/gc/include/private/gcconfig.h:1.2.2.2 Fri Jun  6 05:46:20 2003
--- emacs/gc/include/private/gcconfig.h Mon Jun 16 11:41:51 2003
***************
*** 26,31 ****
--- 26,37 ----
  
  # define GCCONFIG_H
  
+ # ifndef GC_PRIVATE_H
+     /* Fake ptr_t declaration, just to avoid compilation errors.      */
+     /* This avoids many instances if "ifndef GC_PRIVATE_H" below.     */
+     typedef struct GC_undefined_struct * ptr_t;
+ # endif
+ 
  /* #define GET_MEM(bytes) HBLKPTR((size_t) callocx(1, (size_t)bytes + 
GC_page_size) + GC_page_size-1) */
  
  /* Machine dependent parameters.  Some tuning parameters can be found */
***************
*** 35,41 ****
--- 41,49 ----
  
  /* First a unified test for Linux: */
  # if defined(linux) || defined(__linux__)
+ #  ifndef LINUX
  #    define LINUX
+ #  endif
  # endif
  
  /* And one for NetBSD: */
***************
*** 222,228 ****
  #    define ARM32
  #    define mach_type_known
  # endif
! # if defined(LINUX) && (defined(powerpc) || defined(__powerpc__))
  #    define POWERPC
  #    define mach_type_known
  # endif
--- 230,236 ----
  #    define ARM32
  #    define mach_type_known
  # endif
! # if defined(LINUX) && (defined(powerpc) || defined(__powerpc__) || 
defined(powerpc64) || defined(__powerpc64__))
  #    define POWERPC
  #    define mach_type_known
  # endif
***************
*** 268,279 ****
  # endif
  # if defined(macosx) || \
       defined(__APPLE__) && defined(__MACH__) && defined(__ppc__)
! #    define MACOSX
  #    define POWERPC
  #    define mach_type_known
  # endif
  # if defined(__APPLE__) && defined(__MACH__) && defined(__i386__)
! #    define MACOSX
  #    define I386
       --> Not really supported, but at least we recognize it.
  # endif
--- 276,287 ----
  # endif
  # if defined(macosx) || \
       defined(__APPLE__) && defined(__MACH__) && defined(__ppc__)
! #    define DARWIN
  #    define POWERPC
  #    define mach_type_known
  # endif
  # if defined(__APPLE__) && defined(__MACH__) && defined(__i386__)
! #    define DARWIN
  #    define I386
       --> Not really supported, but at least we recognize it.
  # endif
***************
*** 452,457 ****
--- 460,468 ----
                    /*             SH         ==> Hitachi SuperH        */
                    /*                  (LINUX & MSWINCE)               */
                    /*             X86_64     ==> AMD x86-64            */
+                   /*             POWERPC    ==> IBM/Apple PowerPC     */
+                   /*                  (MACOS(<=9),DARWIN(incl.MACOSX),*/
+                   /*                   LINUX, NETBSD, NOSYS variants) */
  
  
  /*
***************
*** 698,735 ****
  #     define DATAEND  /* not needed */
  #   endif
  #   ifdef LINUX
! #     define ALIGNMENT 4      /* Guess.  Can someone verify?  */
                                /* This was 2, but that didn't sound right. */
  #     define OS_TYPE "LINUX"
        /* HEURISTIC1 has been reliably reported to fail for a 32-bit   */
        /* executable on a 64 bit kernel.                                       
*/
  #     define LINUX_STACKBOTTOM
  #     define DYNAMIC_LOADING
- #     undef STACK_GRAN
- #     define STACK_GRAN 0x10000000
-       /* Stack usually starts at 0x80000000 */
  #     define SEARCH_FOR_DATA_START
        extern int _end[];
  #     define DATAEND (_end)
  #   endif
! #   ifdef MACOSX
!       /* There are reasons to suspect this may not be reliable.       */
  #     define ALIGNMENT 4
! #     define OS_TYPE "MACOSX"
! #     ifdef GC_MACOSX_THREADS
! #     define SIG_SUSPEND SIGXCPU
! #     define SIG_THR_RESTART SIGXFSZ
! #     endif
  #     define DYNAMIC_LOADING
!       /* XXX: see get_end(3), get_etext() and get_end() should not be used */
  #     define DATASTART ((ptr_t) get_etext())
- #     define STACKBOTTOM ((ptr_t) 0xc0000000)
  #     define DATAEND  ((ptr_t) get_end())
  #     define USE_MMAP
  #     define USE_MMAP_ANON
! /* #     define MPROTECT_VDB  -- There is some evidence that this breaks 
!  *       on some minor versions of MACOSX, i.e. 10.2.3.  In theory,
!  *       it should be OK */
  #     include <unistd.h>
  #     define GETPAGESIZE() getpagesize()
  #     if defined(USE_PPC_PREFETCH) && defined(__GNUC__)
--- 709,745 ----
  #     define DATAEND  /* not needed */
  #   endif
  #   ifdef LINUX
! #     if (defined (powerpc64) || defined(__powerpc64__))
! #       define ALIGNMENT 8
! #       define CPP_WORDSZ 64
! #     else
! #       define ALIGNMENT 4    /* Guess.  Can someone verify?  */
                                /* This was 2, but that didn't sound right. */
+ #     endif
  #     define OS_TYPE "LINUX"
        /* HEURISTIC1 has been reliably reported to fail for a 32-bit   */
        /* executable on a 64 bit kernel.                                       
*/
  #     define LINUX_STACKBOTTOM
  #     define DYNAMIC_LOADING
  #     define SEARCH_FOR_DATA_START
        extern int _end[];
  #     define DATAEND (_end)
  #   endif
! #   ifdef DARWIN
  #     define ALIGNMENT 4
! #     define OS_TYPE "DARWIN"
  #     define DYNAMIC_LOADING
!       /* XXX: see get_end(3), get_etext() and get_end() should not be used.
!          These aren't used when dyld support is enabled (it is by default) */
  #     define DATASTART ((ptr_t) get_etext())
  #     define DATAEND  ((ptr_t) get_end())
+ #     define STACKBOTTOM ((ptr_t) 0xc0000000)
  #     define USE_MMAP
  #     define USE_MMAP_ANON
! #     define USE_ASM_PUSH_REGS
!       /* This is potentially buggy. It needs more testing. See the comments in
!          os_dep.c */
! #     define MPROTECT_VDB
  #     include <unistd.h>
  #     define GETPAGESIZE() getpagesize()
  #     if defined(USE_PPC_PREFETCH) && defined(__GNUC__)
***************
*** 739,744 ****
--- 749,757 ----
  #     define PREFETCH_FOR_WRITE(x) \
          __asm__ __volatile__ ("dcbtst 0,%0" : : "r" ((const void *) (x)))
  #     endif
+       /* There seems to be some issues with trylock hanging on darwin. This
+          should be looked into some more */
+ #     define NO_PTHREAD_TRYLOCK
  #   endif
  #   ifdef NETBSD
  #     define ALIGNMENT 4
***************
*** 1085,1092 ****
--- 1098,1109 ----
        /*      DATAEND     = _data_end__               */
        /* To get it right for both, we take the        */
        /* minumum/maximum of the two.                  */
+ #     ifndef MAX
  #     define MAX(x,y) ((x) > (y) ? (x) : (y))
+ #     endif
+ #     ifndef MIN
  #     define MIN(x,y) ((x) < (y) ? (x) : (y))
+ #     endif
  #       define DATASTART ((ptr_t) MIN(_data_start__, _bss_start__))
  #       define DATAEND         ((ptr_t) MAX(_data_end__, _bss_end__))
  #     undef STACK_GRAN
***************
*** 1279,1285 ****
                              /* heap sections so they're not           */
                              /* considered as roots.                   */
  #     define OS_TYPE "IRIX5"
! #       define MPROTECT_VDB
  #       ifdef _MIPS_SZPTR
  #       define CPP_WORDSZ _MIPS_SZPTR
  #       define ALIGNMENT (_MIPS_SZPTR/8)
--- 1296,1303 ----
                              /* heap sections so they're not           */
                              /* considered as roots.                   */
  #     define OS_TYPE "IRIX5"
! /*#       define MPROTECT_VDB DOB: this should work, but there is evidence */
! /*            of recent breakage.                                        */
  #       ifdef _MIPS_SZPTR
  #       define CPP_WORDSZ _MIPS_SZPTR
  #       define ALIGNMENT (_MIPS_SZPTR/8)
***************
*** 1318,1332 ****
  
  # ifdef RS6000
  #   define MACH_TYPE "RS6000"
  #   ifdef __64BIT__
  #     define ALIGNMENT 8
  #     define CPP_WORDSZ 64
! #     define STACKBOTTOM 0x1000000000000000
  #   else
  #     define ALIGNMENT 4
  #     define CPP_WORDSZ 32
  #     define STACKBOTTOM ((ptr_t)((ulong)&errno))
  #   endif
      extern int _data[], _end[];
  #   define DATASTART ((ptr_t)((ulong)_data))
  #   define DATAEND ((ptr_t)((ulong)_end))
--- 1336,1363 ----
  
  # ifdef RS6000
  #   define MACH_TYPE "RS6000"
+ #   ifdef ALIGNMENT
+ #     undef ALIGNMENT
+ #   endif
+ #   ifdef IA64
+ #     undef IA64 /* DOB: some AIX installs stupidly define IA64 in 
/usr/include/sys/systemcfg.h */
+ #   endif
  #   ifdef __64BIT__
  #     define ALIGNMENT 8
  #     define CPP_WORDSZ 64
! #     define STACKBOTTOM ((ptr_t)0x1000000000000000)
  #   else
  #     define ALIGNMENT 4
  #     define CPP_WORDSZ 32
  #     define STACKBOTTOM ((ptr_t)((ulong)&errno))
  #   endif
+  /* From AIX linker man page:
+  _text Specifies the first location of the program.
+  _etext Specifies the first location after the program.
+  _data Specifies the first location of the data.
+  _edata Specifies the first location after the initialized data
+  _end or end Specifies the first location after all data.
+  */
      extern int _data[], _end[];
  #   define DATASTART ((ptr_t)((ulong)_data))
  #   define DATAEND ((ptr_t)((ulong)_end))
***************
*** 1820,1827 ****
  # endif
  
  # if defined(SVR4) || defined(LINUX) || defined(IRIX) || defined(HPUX) \
!           || defined(OPENBSD) || defined(NETBSD) || defined(FREEBSD) || 
defined(DGUX) \
!           || defined(BSD) || defined(AIX) || defined(MACOSX) || defined(OSF1)
  #   define UNIX_LIKE   /* Basic Unix-like system calls work.  */
  # endif
  
--- 1851,1859 ----
  # endif
  
  # if defined(SVR4) || defined(LINUX) || defined(IRIX) || defined(HPUX) \
!           || defined(OPENBSD) || defined(NETBSD) || defined(FREEBSD) \
!           || defined(DGUX) || defined(BSD) \
!           || defined(_AIX) || defined(DARWIN) || defined(OSF1)
  #   define UNIX_LIKE   /* Basic Unix-like system calls work.  */
  # endif
  
***************
*** 1886,1892 ****
      /* platforms as well, though it should be avoided in win32.               
*/
  # endif /* LINUX */
  
! # if defined(SEARCH_FOR_DATA_START) && defined(GC_PRIVATE_H)
      extern ptr_t GC_data_start;
  #   define DATASTART GC_data_start
  # endif
--- 1918,1924 ----
      /* platforms as well, though it should be avoided in win32.               
*/
  # endif /* LINUX */
  
! # if defined(SEARCH_FOR_DATA_START)
      extern ptr_t GC_data_start;
  #   define DATASTART GC_data_start
  # endif
***************
*** 1914,1919 ****
--- 1946,1954 ----
  # if defined(GC_HPUX_THREADS) && !defined(HPUX)
        --> inconsistent configuration
  # endif
+ # if defined(GC_AIX_THREADS) && !defined(_AIX)
+       --> inconsistent configuration
+ # endif
  # if defined(GC_WIN32_THREADS) && !defined(MSWIN32) && !defined(CYGWIN32)
        --> inconsistent configuration
  # endif
***************
*** 1924,1930 ****
  #   define THREADS
  # endif
  
! # if defined(HP_PA) || defined(M88K) || defined(POWERPC) && !defined(MACOSX) \
             || defined(LINT) || defined(MSWINCE) || defined(ARM32) \
             || (defined(I386) && defined(__LCC__))
        /* Use setjmp based hack to mark from callee-save registers.    */
--- 1959,1965 ----
  #   define THREADS
  # endif
  
! # if defined(HP_PA) || defined(M88K) || defined(POWERPC) && !defined(DARWIN) \
             || defined(LINT) || defined(MSWINCE) || defined(ARM32) \
             || (defined(I386) && defined(__LCC__))
        /* Use setjmp based hack to mark from callee-save registers.    */
***************
*** 2042,2050 ****
                                              + GC_page_size-1)
  #     else
  #     ifdef MSWIN32
! #       ifdef GC_PRIVATE_H
!                 extern ptr_t GC_win32_get_mem();
! #       endif
  #         define GET_MEM(bytes) (struct hblk *)GC_win32_get_mem(bytes)
  #     else
  #       ifdef MACOS
--- 2077,2083 ----
                                              + GC_page_size-1)
  #     else
  #     ifdef MSWIN32
!         extern ptr_t GC_win32_get_mem();
  #         define GET_MEM(bytes) (struct hblk *)GC_win32_get_mem(bytes)
  #     else
  #       ifdef MACOS
***************
*** 2060,2068 ****
  #         endif
  #       else
  #         ifdef MSWINCE
! #           ifdef GC_PRIVATE_H
!               extern ptr_t GC_wince_get_mem();
! #           endif
  #           define GET_MEM(bytes) (struct hblk *)GC_wince_get_mem(bytes)
  #         else
  #           if defined(AMIGA) && defined(GC_AMIGA_FASTALLOC)
--- 2093,2099 ----
  #         endif
  #       else
  #         ifdef MSWINCE
!             extern ptr_t GC_wince_get_mem();
  #           define GET_MEM(bytes) (struct hblk *)GC_wince_get_mem(bytes)
  #         else
  #           if defined(AMIGA) && defined(GC_AMIGA_FASTALLOC)
***************
*** 2071,2079 ****
                          GC_amiga_get_mem((size_t)bytes + GC_page_size) \
                          + GC_page_size-1)
  #           else
! #             ifdef GC_PRIVATE_H
!                 extern ptr_t GC_unix_get_mem();
! #             endif
  #               define GET_MEM(bytes) (struct hblk *)GC_unix_get_mem(bytes)
  #           endif
  #         endif
--- 2102,2108 ----
                          GC_amiga_get_mem((size_t)bytes + GC_page_size) \
                          + GC_page_size-1)
  #           else
!               extern ptr_t GC_unix_get_mem();
  #               define GET_MEM(bytes) (struct hblk *)GC_unix_get_mem(bytes)
  #           endif
  #         endif




reply via email to

[Prev in Thread] Current Thread [Next in Thread]