+2009-09-26 Ivan Maidanski <ivmai@mail.ru>
+
+ * allchblk.c (GC_enough_large_bytes_left): Replace "inline static"
+ with GC_INLINE.
+ * include/private/gc_priv.h (fixed_getenv): Ditto.
+ * alloc.c (GC_max, GC_min): Replace "static INLINE" with
+ GC_INLINE.
+ * mark_rts.c (rt_hash): Ditto.
+ * win32_threads.c (GC_get_max_thread_index): Ditto.
+ * include/private/gc_priv.h (INLINE): Prefix with "GC_"; include
+ "static"; define for Sun CC; define for VC++ (and other
+ compilers).
+ * pthread_support.c: Don't define __inline__ for non-GNU compilers
+ (not needed anymore).
+
2009-09-26 Ivan Maidanski <ivmai@mail.ru>
* NT_THREADS_MAKEFILE: Remove file (since it duplicates gc.mak).
/* Is GC_large_allocd_bytes + the number of free bytes on lists */
/* n .. N_HBLK_FLS > GC_max_large_allocd_bytes. */
/* If there is no such n, return 0. */
-# ifdef __GNUC__
- __inline__
-# endif
- static int GC_enough_large_bytes_left(void)
+ GC_INLINE int GC_enough_large_bytes_left(void)
{
int n;
word bytes = GC_large_allocd_bytes;
void * GC_least_plausible_heap_addr = (void *)ONES;
void * GC_greatest_plausible_heap_addr = 0;
-static INLINE word GC_max(word x, word y)
+GC_INLINE word GC_max(word x, word y)
{
return(x > y? x : y);
}
-static INLINE word GC_min(word x, word y)
+GC_INLINE word GC_min(word x, word y)
{
return(x < y? x : y);
}
# define EXPECT(expr, outcome) (expr)
#endif /* __GNUC__ */
-#if __GNUC__ >= 3
-# define INLINE inline
+#if defined(_MSC_VER) || defined(__INTEL_COMPILER) || defined(__DMC__) \
+ || defined(__WATCOMC__)
+# define GC_INLINE static __inline
+#elif (__GNUC__ >= 3) || defined(__sun)
+# define GC_INLINE static inline
#else
-# define INLINE
-#endif /* __GNUC__ */
+# define GC_INLINE static
+#endif
#ifndef GC_API_PRIV
# define GC_API_PRIV GC_API
#if !defined(NO_GETENV)
# if defined(EMPTY_GETENV_RESULTS)
/* Workaround for a reputed Wine bug. */
- static inline char * fixed_getenv(const char *name)
+ GC_INLINE char * fixed_getenv(const char *name)
{
char * tmp = getenv(name);
if (tmp == 0 || strlen(tmp) == 0)
-- really defined in gc_priv.h
*/
-static INLINE int rt_hash(ptr_t addr)
+GC_INLINE int rt_hash(ptr_t addr)
{
word result = (word) addr;
# if CPP_WORDSZ > 8*LOG_RT_SIZE
typedef unsigned int sem_t;
#endif /* GC_DGUX386_THREADS */
-#ifndef __GNUC__
-# define __inline__
-#endif
-
/* Undefine macros used to redirect pthread primitives. */
# undef pthread_create
# if !defined(GC_DARWIN_THREADS)
* GC_max_thread_index may temporarily be larger than MAX_THREADS.
* To avoid subscript errors, we check on access.
*/
-#ifdef __GNUC__
- __inline__
-#endif
-STATIC LONG GC_get_max_thread_index(void)
+GC_INLINE LONG GC_get_max_thread_index(void)
{
LONG my_max = GC_max_thread_index;