/[emacs]/emacs/gc/include/private/gcconfig.h
ViewVC logotype

Diff of /emacs/gc/include/private/gcconfig.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2.2.2 by fx, Fri Jun 6 09:46:20 2003 UTC revision 1.2.2.3 by fx, Mon Jun 16 15:41:51 2003 UTC
# Line 26  Line 26 
26    
27  # define GCCONFIG_H  # define GCCONFIG_H
28    
29    # ifndef GC_PRIVATE_H
30        /* Fake ptr_t declaration, just to avoid compilation errors.        */
31        /* This avoids many instances if "ifndef GC_PRIVATE_H" below.       */
32        typedef struct GC_undefined_struct * ptr_t;
33    # endif
34    
35  /* #define GET_MEM(bytes) HBLKPTR((size_t) callocx(1, (size_t)bytes + GC_page_size) + GC_page_size-1) */  /* #define GET_MEM(bytes) HBLKPTR((size_t) callocx(1, (size_t)bytes + GC_page_size) + GC_page_size-1) */
36    
37  /* Machine dependent parameters.  Some tuning parameters can be found   */  /* Machine dependent parameters.  Some tuning parameters can be found   */
# Line 35  Line 41 
41    
42  /* First a unified test for Linux: */  /* First a unified test for Linux: */
43  # if defined(linux) || defined(__linux__)  # if defined(linux) || defined(__linux__)
44    #  ifndef LINUX
45  #    define LINUX  #    define LINUX
46    #  endif
47  # endif  # endif
48    
49  /* And one for NetBSD: */  /* And one for NetBSD: */
# Line 222  Line 230 
230  #    define ARM32  #    define ARM32
231  #    define mach_type_known  #    define mach_type_known
232  # endif  # endif
233  # if defined(LINUX) && (defined(powerpc) || defined(__powerpc__))  # if defined(LINUX) && (defined(powerpc) || defined(__powerpc__) || defined(powerpc64) || defined(__powerpc64__))
234  #    define POWERPC  #    define POWERPC
235  #    define mach_type_known  #    define mach_type_known
236  # endif  # endif
# Line 268  Line 276 
276  # endif  # endif
277  # if defined(macosx) || \  # if defined(macosx) || \
278       defined(__APPLE__) && defined(__MACH__) && defined(__ppc__)       defined(__APPLE__) && defined(__MACH__) && defined(__ppc__)
279  #    define MACOSX  #    define DARWIN
280  #    define POWERPC  #    define POWERPC
281  #    define mach_type_known  #    define mach_type_known
282  # endif  # endif
283  # if defined(__APPLE__) && defined(__MACH__) && defined(__i386__)  # if defined(__APPLE__) && defined(__MACH__) && defined(__i386__)
284  #    define MACOSX  #    define DARWIN
285  #    define I386  #    define I386
286       --> Not really supported, but at least we recognize it.       --> Not really supported, but at least we recognize it.
287  # endif  # endif
# Line 452  Line 460 
460                      /*             SH         ==> Hitachi SuperH        */                      /*             SH         ==> Hitachi SuperH        */
461                      /*                  (LINUX & MSWINCE)               */                      /*                  (LINUX & MSWINCE)               */
462                      /*             X86_64     ==> AMD x86-64            */                      /*             X86_64     ==> AMD x86-64            */
463                        /*             POWERPC    ==> IBM/Apple PowerPC     */
464                        /*                  (MACOS(<=9),DARWIN(incl.MACOSX),*/
465                        /*                   LINUX, NETBSD, NOSYS variants) */
466    
467    
468  /*  /*
# Line 698  Line 709 
709  #     define DATAEND  /* not needed */  #     define DATAEND  /* not needed */
710  #   endif  #   endif
711  #   ifdef LINUX  #   ifdef LINUX
712  #     define ALIGNMENT 4        /* Guess.  Can someone verify?  */  #     if (defined (powerpc64) || defined(__powerpc64__))
713    #       define ALIGNMENT 8
714    #       define CPP_WORDSZ 64
715    #     else
716    #       define ALIGNMENT 4      /* Guess.  Can someone verify?  */
717                                  /* This was 2, but that didn't sound right. */                                  /* This was 2, but that didn't sound right. */
718    #     endif
719  #     define OS_TYPE "LINUX"  #     define OS_TYPE "LINUX"
720        /* HEURISTIC1 has been reliably reported to fail for a 32-bit     */        /* HEURISTIC1 has been reliably reported to fail for a 32-bit     */
721        /* executable on a 64 bit kernel.                                 */        /* executable on a 64 bit kernel.                                 */
722  #     define LINUX_STACKBOTTOM  #     define LINUX_STACKBOTTOM
723  #     define DYNAMIC_LOADING  #     define DYNAMIC_LOADING
 #     undef STACK_GRAN  
 #     define STACK_GRAN 0x10000000  
         /* Stack usually starts at 0x80000000 */  
724  #     define SEARCH_FOR_DATA_START  #     define SEARCH_FOR_DATA_START
725        extern int _end[];        extern int _end[];
726  #     define DATAEND (_end)  #     define DATAEND (_end)
727  #   endif  #   endif
728  #   ifdef MACOSX  #   ifdef DARWIN
       /* There are reasons to suspect this may not be reliable.         */  
729  #     define ALIGNMENT 4  #     define ALIGNMENT 4
730  #     define OS_TYPE "MACOSX"  #     define OS_TYPE "DARWIN"
 #     ifdef GC_MACOSX_THREADS  
 #       define SIG_SUSPEND SIGXCPU  
 #       define SIG_THR_RESTART SIGXFSZ  
 #     endif  
731  #     define DYNAMIC_LOADING  #     define DYNAMIC_LOADING
732        /* XXX: see get_end(3), get_etext() and get_end() should not be used */        /* XXX: see get_end(3), get_etext() and get_end() should not be used.
733             These aren't used when dyld support is enabled (it is by default) */
734  #     define DATASTART ((ptr_t) get_etext())  #     define DATASTART ((ptr_t) get_etext())
 #     define STACKBOTTOM ((ptr_t) 0xc0000000)  
735  #     define DATAEND    ((ptr_t) get_end())  #     define DATAEND    ((ptr_t) get_end())
736    #     define STACKBOTTOM ((ptr_t) 0xc0000000)
737  #     define USE_MMAP  #     define USE_MMAP
738  #     define USE_MMAP_ANON  #     define USE_MMAP_ANON
739  /* #     define MPROTECT_VDB  -- There is some evidence that this breaks  #     define USE_ASM_PUSH_REGS
740   *       on some minor versions of MACOSX, i.e. 10.2.3.  In theory,        /* This is potentially buggy. It needs more testing. See the comments in
741   *       it should be OK */           os_dep.c */
742    #     define MPROTECT_VDB
743  #     include <unistd.h>  #     include <unistd.h>
744  #     define GETPAGESIZE() getpagesize()  #     define GETPAGESIZE() getpagesize()
745  #     if defined(USE_PPC_PREFETCH) && defined(__GNUC__)  #     if defined(USE_PPC_PREFETCH) && defined(__GNUC__)
# Line 739  Line 749 
749  #       define PREFETCH_FOR_WRITE(x) \  #       define PREFETCH_FOR_WRITE(x) \
750            __asm__ __volatile__ ("dcbtst 0,%0" : : "r" ((const void *) (x)))            __asm__ __volatile__ ("dcbtst 0,%0" : : "r" ((const void *) (x)))
751  #     endif  #     endif
752          /* There seems to be some issues with trylock hanging on darwin. This
753             should be looked into some more */
754    #     define NO_PTHREAD_TRYLOCK
755  #   endif  #   endif
756  #   ifdef NETBSD  #   ifdef NETBSD
757  #     define ALIGNMENT 4  #     define ALIGNMENT 4
# Line 1085  Line 1098 
1098          /*      DATAEND     = _data_end__               */          /*      DATAEND     = _data_end__               */
1099          /* To get it right for both, we take the        */          /* To get it right for both, we take the        */
1100          /* minumum/maximum of the two.                  */          /* minumum/maximum of the two.                  */
1101    #     ifndef MAX
1102  #       define MAX(x,y) ((x) > (y) ? (x) : (y))  #       define MAX(x,y) ((x) > (y) ? (x) : (y))
1103    #     endif
1104    #     ifndef MIN
1105  #       define MIN(x,y) ((x) < (y) ? (x) : (y))  #       define MIN(x,y) ((x) < (y) ? (x) : (y))
1106    #     endif
1107  #       define DATASTART ((ptr_t) MIN(_data_start__, _bss_start__))  #       define DATASTART ((ptr_t) MIN(_data_start__, _bss_start__))
1108  #       define DATAEND   ((ptr_t) MAX(_data_end__, _bss_end__))  #       define DATAEND   ((ptr_t) MAX(_data_end__, _bss_end__))
1109  #       undef STACK_GRAN  #       undef STACK_GRAN
# Line 1279  Line 1296 
1296                                /* heap sections so they're not           */                                /* heap sections so they're not           */
1297                                /* considered as roots.                   */                                /* considered as roots.                   */
1298  #       define OS_TYPE "IRIX5"  #       define OS_TYPE "IRIX5"
1299  #       define MPROTECT_VDB  /*#       define MPROTECT_VDB DOB: this should work, but there is evidence */
1300    /*              of recent breakage.                                        */
1301  #       ifdef _MIPS_SZPTR  #       ifdef _MIPS_SZPTR
1302  #         define CPP_WORDSZ _MIPS_SZPTR  #         define CPP_WORDSZ _MIPS_SZPTR
1303  #         define ALIGNMENT (_MIPS_SZPTR/8)  #         define ALIGNMENT (_MIPS_SZPTR/8)
# Line 1318  Line 1336 
1336    
1337  # ifdef RS6000  # ifdef RS6000
1338  #   define MACH_TYPE "RS6000"  #   define MACH_TYPE "RS6000"
1339    #   ifdef ALIGNMENT
1340    #     undef ALIGNMENT
1341    #   endif
1342    #   ifdef IA64
1343    #     undef IA64 /* DOB: some AIX installs stupidly define IA64 in /usr/include/sys/systemcfg.h */
1344    #   endif
1345  #   ifdef __64BIT__  #   ifdef __64BIT__
1346  #     define ALIGNMENT 8  #     define ALIGNMENT 8
1347  #     define CPP_WORDSZ 64  #     define CPP_WORDSZ 64
1348  #     define STACKBOTTOM 0x1000000000000000  #     define STACKBOTTOM ((ptr_t)0x1000000000000000)
1349  #   else  #   else
1350  #     define ALIGNMENT 4  #     define ALIGNMENT 4
1351  #     define CPP_WORDSZ 32  #     define CPP_WORDSZ 32
1352  #     define STACKBOTTOM ((ptr_t)((ulong)&errno))  #     define STACKBOTTOM ((ptr_t)((ulong)&errno))
1353  #   endif  #   endif
1354     /* From AIX linker man page:
1355     _text Specifies the first location of the program.
1356     _etext Specifies the first location after the program.
1357     _data Specifies the first location of the data.
1358     _edata Specifies the first location after the initialized data
1359     _end or end Specifies the first location after all data.
1360     */
1361      extern int _data[], _end[];      extern int _data[], _end[];
1362  #   define DATASTART ((ptr_t)((ulong)_data))  #   define DATASTART ((ptr_t)((ulong)_data))
1363  #   define DATAEND ((ptr_t)((ulong)_end))  #   define DATAEND ((ptr_t)((ulong)_end))
# Line 1820  Line 1851 
1851  # endif  # endif
1852    
1853  # if defined(SVR4) || defined(LINUX) || defined(IRIX) || defined(HPUX) \  # if defined(SVR4) || defined(LINUX) || defined(IRIX) || defined(HPUX) \
1854              || defined(OPENBSD) || defined(NETBSD) || defined(FREEBSD) || defined(DGUX) \              || defined(OPENBSD) || defined(NETBSD) || defined(FREEBSD) \
1855              || defined(BSD) || defined(AIX) || defined(MACOSX) || defined(OSF1)              || defined(DGUX) || defined(BSD) \
1856                || defined(_AIX) || defined(DARWIN) || defined(OSF1)
1857  #   define UNIX_LIKE   /* Basic Unix-like system calls work.    */  #   define UNIX_LIKE   /* Basic Unix-like system calls work.    */
1858  # endif  # endif
1859    
# Line 1886  Line 1918 
1918      /* platforms as well, though it should be avoided in win32.         */      /* platforms as well, though it should be avoided in win32.         */
1919  # endif /* LINUX */  # endif /* LINUX */
1920    
1921  # if defined(SEARCH_FOR_DATA_START) && defined(GC_PRIVATE_H)  # if defined(SEARCH_FOR_DATA_START)
1922      extern ptr_t GC_data_start;      extern ptr_t GC_data_start;
1923  #   define DATASTART GC_data_start  #   define DATASTART GC_data_start
1924  # endif  # endif
# Line 1914  Line 1946 
1946  # if defined(GC_HPUX_THREADS) && !defined(HPUX)  # if defined(GC_HPUX_THREADS) && !defined(HPUX)
1947          --> inconsistent configuration          --> inconsistent configuration
1948  # endif  # endif
1949    # if defined(GC_AIX_THREADS) && !defined(_AIX)
1950            --> inconsistent configuration
1951    # endif
1952  # if defined(GC_WIN32_THREADS) && !defined(MSWIN32) && !defined(CYGWIN32)  # if defined(GC_WIN32_THREADS) && !defined(MSWIN32) && !defined(CYGWIN32)
1953          --> inconsistent configuration          --> inconsistent configuration
1954  # endif  # endif
# Line 1924  Line 1959 
1959  #   define THREADS  #   define THREADS
1960  # endif  # endif
1961    
1962  # if defined(HP_PA) || defined(M88K) || defined(POWERPC) && !defined(MACOSX) \  # if defined(HP_PA) || defined(M88K) || defined(POWERPC) && !defined(DARWIN) \
1963               || defined(LINT) || defined(MSWINCE) || defined(ARM32) \               || defined(LINT) || defined(MSWINCE) || defined(ARM32) \
1964               || (defined(I386) && defined(__LCC__))               || (defined(I386) && defined(__LCC__))
1965          /* Use setjmp based hack to mark from callee-save registers.    */          /* Use setjmp based hack to mark from callee-save registers.    */
# Line 2042  Line 2077 
2077                                                + GC_page_size-1)                                                + GC_page_size-1)
2078  #     else  #     else
2079  #       ifdef MSWIN32  #       ifdef MSWIN32
2080  #         ifdef GC_PRIVATE_H            extern ptr_t GC_win32_get_mem();
                   extern ptr_t GC_win32_get_mem();  
 #         endif  
2081  #         define GET_MEM(bytes) (struct hblk *)GC_win32_get_mem(bytes)  #         define GET_MEM(bytes) (struct hblk *)GC_win32_get_mem(bytes)
2082  #       else  #       else
2083  #         ifdef MACOS  #         ifdef MACOS
# Line 2060  Line 2093 
2093  #           endif  #           endif
2094  #         else  #         else
2095  #           ifdef MSWINCE  #           ifdef MSWINCE
2096  #             ifdef GC_PRIVATE_H                extern ptr_t GC_wince_get_mem();
                 extern ptr_t GC_wince_get_mem();  
 #             endif  
2097  #             define GET_MEM(bytes) (struct hblk *)GC_wince_get_mem(bytes)  #             define GET_MEM(bytes) (struct hblk *)GC_wince_get_mem(bytes)
2098  #           else  #           else
2099  #             if defined(AMIGA) && defined(GC_AMIGA_FASTALLOC)  #             if defined(AMIGA) && defined(GC_AMIGA_FASTALLOC)
# Line 2071  Line 2102 
2102                            GC_amiga_get_mem((size_t)bytes + GC_page_size) \                            GC_amiga_get_mem((size_t)bytes + GC_page_size) \
2103                            + GC_page_size-1)                            + GC_page_size-1)
2104  #             else  #             else
2105  #               ifdef GC_PRIVATE_H                  extern ptr_t GC_unix_get_mem();
                   extern ptr_t GC_unix_get_mem();  
 #               endif  
2106  #               define GET_MEM(bytes) (struct hblk *)GC_unix_get_mem(bytes)  #               define GET_MEM(bytes) (struct hblk *)GC_unix_get_mem(bytes)
2107  #             endif  #             endif
2108  #           endif  #           endif

Legend:
Removed from v.1.2.2.2  
changed lines
  Added in v.1.2.2.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26