2007-12-21 Hans Boehm <Hans.Boehm@hp.com>
authorhboehm <hboehm>
Sat, 22 Dec 2007 01:05:43 +0000 (01:05 +0000)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 26 Jul 2011 17:06:41 +0000 (21:06 +0400)
* alloc.c: Define GC_version instead of in version.h.
* version.h: Remove.
* include/gc_version.h: Move most of version.h here.
* include/gc.h: Include gc_version.h.
* gcname.c, add_gc_prefix.c: include gc.h instead of version.h.
* Makefile.direct, Makefile.dj, Makefile.am: Adjust for
version.h rename.

2007-12-21  Hans Boehm <Hans.Boehm@hp.com> (Really mostly russ sludge dot net)

* configure.ac: Put libatomic_ops links in build directory.
* configure: Regenerate.
* Makefile.am: Dont mention atomic_ops.c and atomic_ops_sysdeps.S
as nodist sources.

Makefile.am
Makefile.direct
Makefile.dj
add_gc_prefix.c
alloc.c
configure
configure.ac
gcname.c
include/gc.h
include/gc_version.h [moved from version.h with 84% similarity]

index e632864..9851a37 100644 (file)
@@ -71,14 +71,6 @@ if WIN32_THREADS
 libgc_la_SOURCES += win32_threads.c
 endif
 
-if USE_INTERNAL_LIBATOMIC_OPS
-nodist_libgc_la_SOURCES = atomic_ops.c
-endif
-
-if NEED_ATOMIC_OPS_ASM
-nodist_libgc_la_SOURCES = atomic_ops_sysdeps.S
-endif
-
 # Include THREADDLLIBS here to ensure that the correct versions of
 # linuxthread semaphore functions get linked:
 libgc_la_LIBADD = @addobjs@ $(THREADDLLIBS) $(UNWINDLIBS)
@@ -154,7 +146,6 @@ dist_noinst_SCRIPTS = callprocs configure.host
 # headers which are not installed
 # (see include/include.am for more)
 #
-dist_noinst_HEADERS += version.h
 
 # documentation which is not installed
 #
index 0214513..158f046 100644 (file)
@@ -344,7 +344,7 @@ CORD_OBJS=  cord/cordbscs.o cord/cordxtra.o cord/cordprnt.o
 
 SRCS= $(CSRCS) mips_sgi_mach_dep.s rs6000_mach_dep.s alpha_mach_dep.S \
     sparc_mach_dep.S include/gc.h include/gc_typed.h include/gc_tiny_fl.h \
-    include/private/gc_hdrs.h include/private/gc_priv.h \
+    include/gc_version.h include/private/gc_hdrs.h include/private/gc_priv.h \
     include/private/gcconfig.h include/private/gc_pmark.h \
     include/gc_inline.h include/gc_mark.h \
     threadlibs.c if_mach.c if_not_there.c gc_cpp.cc include/gc_cpp.h \
@@ -399,7 +399,7 @@ OTHER_FILES= Makefile setjmp_t.c callprocs \
            Mac_files/datastart.c Mac_files/dataend.c \
            Mac_files/MacOS_config.h Mac_files/MacOS_Test_config.h \
            add_gc_prefix.c gc_cpp.cpp \
-          version.h AmigaOS.c mscvc_dbg.c include/private/msvc_dbg.h \
+          AmigaOS.c mscvc_dbg.c include/private/msvc_dbg.h \
           $(TESTS) $(GNU_BUILD_FILES) $(OTHER_MAKEFILES)
 
 CORD_INCLUDE_FILES= $(srcdir)/include/gc.h $(srcdir)/include/cord.h \
@@ -591,7 +591,7 @@ mark_rts.o: $(srcdir)/mark_rts.c $(UTILS)
 #      Work-around for DEC optimizer tail recursion elimination bug.
 #  The ALPHA-specific line should be removed if gcc is used.
 
-alloc.o: version.h
+alloc.o: include/gc_version.h
 
 cord:
        mkdir cord
@@ -664,10 +664,10 @@ KandRtest: setjmp_test gctest
        ./setjmp_test
        ./gctest
 
-add_gc_prefix: $(srcdir)/add_gc_prefix.c $(srcdir)/version.h
+add_gc_prefix: $(srcdir)/add_gc_prefix.c $(srcdir)/include/gc_version.h
        $(CC) -o add_gc_prefix $(srcdir)/add_gc_prefix.c
 
-gcname: $(srcdir)/gcname.c $(srcdir)/version.h
+gcname: $(srcdir)/gcname.c $(srcdir)/include/gc_version.h
        $(CC) -o gcname $(srcdir)/gcname.c
 
 #We assume this is being done from source directory.
index 4618eb8..c56ea7b 100644 (file)
@@ -165,7 +165,7 @@ CORD_SRCS=  cord/cordbscs.c cord/cordxtra.c cord/cordprnt.c cord/de.c cord/cordt
 CORD_OBJS=  cord/cordbscs.o cord/cordxtra.o cord/cordprnt.o
 
 SRCS= $(CSRCS) mips_sgi_mach_dep.S rs6000_mach_dep.s alpha_mach_dep.S \
-    sparc_mach_dep.S include/gc.h include/gc_typed.h \
+    sparc_mach_dep.S include/gc.h include/gc_version.h include/gc_typed.h \
     include/private/gc_hdrs.h include/private/gc_priv.h \
     include/private/gcconfig.h include/private/gc_mark.h \
     include/gc_inline.h gc.man \
@@ -189,7 +189,7 @@ OTHER_FILES= Makefile PCR-Makefile OS2_MAKEFILE NT_MAKEFILE BCC_MAKEFILE \
            Mac_files/MacOS_config.h Mac_files/MacOS_Test_config.h \
            add_gc_prefix.c README.solaris2 README.sgi README.hp README.uts \
           win32_threads.c NT_THREADS_MAKEFILE gc.mak README.dj Makefile.dj \
-          README.alpha README.linux README.MacOSX version.h Makefile.DLLs \
+          README.alpha README.linux README.MacOSX Makefile.DLLs \
           WCC_MAKEFILE nursery.c include/gc_nursery.h include/gc_copy_descr.h
 
 CORD_INCLUDE_FILES= $(srcdir)/include/gc.h $(srcdir)/include/cord.h \
@@ -302,7 +302,7 @@ mark_rts.o: $(srcdir)/mark_rts.c if_mach if_not_there $(UTILS)
 #      Work-around for DEC optimizer tail recursion elimination bug.
 #  The ALPHA-specific line should be removed if gcc is used.
 
-alloc.o: version.h
+alloc.o: include/gc_version.h
 
 cord/cordbscs.o: $(srcdir)/cord/cordbscs.c $(CORD_INCLUDE_FILES)
        $(CC) $(CFLAGS) -c -I$(srcdir) $(srcdir)/cord/cordbscs.c
index 59515c7..a7fd4fc 100644 (file)
@@ -1,5 +1,5 @@
 # include <stdio.h>
-# include "version.h"
+# include <gc.h>
  
 int main(argc, argv, envp)
 int argc;
diff --git a/alloc.c b/alloc.c
index 14265fd..72d6550 100644 (file)
--- a/alloc.c
+++ b/alloc.c
@@ -90,7 +90,14 @@ char * GC_copyright[] =
 " EXPRESSED OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.",
 "See source code for details." };
 
-# include "version.h"
+/* Version macros are now defined in gc_version.h, which is included by        */
+/* gc.h, which is included by gc_priv.h".                              */
+
+#ifndef GC_NO_VERSION_VAR
+
+unsigned GC_version = ((GC_VERSION_MAJOR << 16) | (GC_VERSION_MINOR << 8) | GC_TMP_ALPHA_VERSION);
+
+#endif /* GC_NO_VERSION_VAR */
 
 /* some more variables */
 
index 53a7196..385323e 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 1.28 .
+# From configure.ac Revision: 1.29 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61 for gc 7.1alpha1.
 #
@@ -21915,20 +21915,20 @@ echo "$as_me: error: Missig libatomic_ops." >&2;}
     { echo "$as_me:$LINENO: Using internal version of libatomic_ops" >&5
 echo "$as_me: Using internal version of libatomic_ops" >&6;}
 
-        test -e ${srcdir}/libatomic_ops \
-       || ln -s ${ao_dir} ${srcdir}/libatomic_ops
+        test -e libatomic_ops \
+       || ln -s ${ao_dir} libatomic_ops
     subdirs="$subdirs libatomic_ops"
 
 
-        test -e ${srcdir}/atomic_ops.c \
-       || ln -s ${srcdir}/libatomic_ops/src/atomic_ops.c \
-                ${srcdir}/atomic_ops.c
+        test -e atomic_ops.c \
+       || ln -s libatomic_ops/src/atomic_ops.c \
+                atomic_ops.c
 
-    test -e ${srcdir}/atomic_ops_sysdeps.S \
-       || ln -s ${srcdir}/libatomic_ops/src/atomic_ops_sysdeps.S \
-                ${srcdir}/atomic_ops_sysdeps.S
+    test -e atomic_ops_sysdeps.S \
+       || ln -s libatomic_ops/src/atomic_ops_sysdeps.S \
+                atomic_ops_sysdeps.S
 
-            GC_CFLAGS="${GC_CFLAGS} -I \$(top_srcdir)/libatomic_ops/src"
+            GC_CFLAGS="${GC_CFLAGS} -I libatomic_ops/src"
     maybe_libatomic_ops="libatomic_ops"
 
 fi
index f34dafd..05d4c5e 100644 (file)
@@ -22,7 +22,7 @@ AC_INIT(gc,7.1alpha1,Hans.Boehm@hp.com)
 AC_CONFIG_SRCDIR(gcj_mlc.c)
 AC_CANONICAL_TARGET 
 AC_PREREQ(2.53)
-AC_REVISION($Revision: 1.29 $)
+AC_REVISION($Revision: 1.30 $)
 GC_SET_VERSION
 AM_INIT_AUTOMAKE([foreign dist-bzip2 subdir-objects nostdinc])
 AM_MAINTAINER_MODE
@@ -639,22 +639,22 @@ AC_CHECK_HEADER(atomic_ops.h,
     AC_MSG_NOTICE([Using internal version of libatomic_ops])
 
     dnl Automake does not accept shell variables in AC_CONFIG_SUBDIRS
-    test -e ${srcdir}/libatomic_ops \
-       || ln -s ${ao_dir} ${srcdir}/libatomic_ops
+    test -e libatomic_ops \
+       || ln -s ${ao_dir} libatomic_ops
     AC_CONFIG_SUBDIRS(libatomic_ops)
 
     dnl Also copy the source files to be linked in.
-    test -e ${srcdir}/atomic_ops.c \
-       || ln -s ${srcdir}/libatomic_ops/src/atomic_ops.c \
-                ${srcdir}/atomic_ops.c
+    test -e atomic_ops.c \
+       || ln -s libatomic_ops/src/atomic_ops.c \
+                atomic_ops.c
 
-    test -e ${srcdir}/atomic_ops_sysdeps.S \
-       || ln -s ${srcdir}/libatomic_ops/src/atomic_ops_sysdeps.S \
-                ${srcdir}/atomic_ops_sysdeps.S
+    test -e atomic_ops_sysdeps.S \
+       || ln -s libatomic_ops/src/atomic_ops_sysdeps.S \
+                atomic_ops_sysdeps.S
 
     dnl This gets the source include files, which is often close enough.
     dnl It also makes atomic_ops_sysdeps.S assemble.
-    GC_CFLAGS="${GC_CFLAGS} -I \$(top_srcdir)/libatomic_ops/src"
+    GC_CFLAGS="${GC_CFLAGS} -I libatomic_ops/src"
     maybe_libatomic_ops="libatomic_ops"
   ])
 
index e2119d7..55b7c9f 100644 (file)
--- a/gcname.c
+++ b/gcname.c
@@ -1,5 +1,5 @@
 #include <stdio.h>
-#include "version.h"
+#include <gc.h>
 
 int main()
 {
index 8af8610..91dc6dc 100644 (file)
 
 # define _GC_H
 
+# include "gc_version.h"
+       /* Define version numbers here to allow test on build machine   */
+       /* for cross-builds.  Note that this defines the header         */
+       /* version number, which may or may not match that of the       */
+       /* dynamic library.  The GC_version variable can be used        */
+       /* to obtain the latter.                                        */
+
 # include "gc_config_macros.h"
 
 # ifdef __cplusplus
similarity index 84%
rename from version.h
rename to include/gc_version.h
index c48ec6c..7c5095c 100644 (file)
--- a/version.h
 # define GC_VERSION_MINOR GC_TMP_VERSION_MINOR
 # define GC_ALPHA_VERSION GC_TMP_ALPHA_VERSION
 #endif
-
-
-#ifndef GC_NO_VERSION_VAR
-
-unsigned GC_version = ((GC_VERSION_MAJOR << 16) | (GC_VERSION_MINOR << 8) | GC_TMP_ALPHA_VERSION);
-
-#endif /* GC_NO_VERSION_VAR */