]> granicus.if.org Git - gc/commitdiff
Move cord_pos.h to public headers folder (since included from cord.h)
authorIvan Maidanski <ivmai@mail.ru>
Mon, 16 Jan 2012 05:24:57 +0000 (09:24 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 16 Jan 2012 12:32:34 +0000 (16:32 +0400)
* include/private/cord_pos.h: Rename to include/cord_pos.h.
* BCC_MAKEFILE (de_win.obj): Rename "private/cord_pos.h" entry to
"cord_pos.h".
* Makefile.direct (CORD_SRCS, CORD_INCLUDE_FILES): Likewise.
* Makefile.dj (CORD_SRCS, CORD_INCLUDE_FILES): Likewise.
* NT_MAKEFILE (de_win.obj): Likewise.
* NT_STATIC_THREADS_MAKEFILE (de_win.obj): Likewise.
* NT_X64_STATIC_THREADS_MAKEFILE (de_win.obj): Likewise.
* NT_X64_THREADS_MAKEFILE (de_win.obj): Likewise.
* OS2_MAKEFILE (cordbscs.obj, cordxtra.obj, cordprnt.obj,
cordtest.exe): Likewise.
* gc.mak (DEP_CPP_DE_WI, DEP_CPP_DE_C2e, DEP_CPP_CORDX,
DEP_CPP_CORDB): Likewise.
* include/include.am (dist_noinst_HEADERS): Likewise.
* include/cord.h: Include "private/cord_pos.h" instead of "cord_pos.h".
* include/cord_pos.h (CORD_H): Test (skip the file if undefined).
* include/cord_pos.h (CORD_POSITION_H): Define.

12 files changed:
BCC_MAKEFILE
Makefile.direct
Makefile.dj
NT_MAKEFILE
NT_STATIC_THREADS_MAKEFILE
NT_X64_STATIC_THREADS_MAKEFILE
NT_X64_THREADS_MAKEFILE
OS2_MAKEFILE
gc.mak
include/cord.h
include/cord_pos.h [moved from include/private/cord_pos.h with 96% similarity]
include/include.am

index d0d08880c0ebd3344d4ed8bc7007d668fcbb6c7d..4e45334606a82014b205cf762865c2c50c76ad7c 100644 (file)
@@ -55,7 +55,7 @@ gctest.exe: tests\test.obj gc.lib
 |\r
 \r
 cord\tests\de.obj cord\tests\de_win.obj: include\cord.h \\r
-    include\private\cord_pos.h cord\tests\de_win.h cord\tests\de_cmds.h\r
+    include\cord_pos.h cord\tests\de_win.h cord\tests\de_cmds.h\r
 \r
 cord\de.exe: cord\cordbscs.obj cord\cordxtra.obj cord\tests\de.obj \\r
     cord\tests\de_win.obj cord\tests\de_win.res gc.lib\r
index 10020fb92094bada9f1615a911c17f59582c7f24..9fe5e67b6075cc4aac4324550b1dd11e9c36fdde 100644 (file)
@@ -86,7 +86,7 @@ CSRCS= reclaim.c allchblk.c misc.c alloc.c mach_dep.c os_dep.c mark_rts.c \
 
 CORD_SRCS= cord/cordbscs.c cord/cordxtra.c cord/cordprnt.c cord/tests/de.c \
   cord/tests/cordtest.c include/cord.h include/ec.h \
-  include/private/cord_pos.h cord/tests/de_win.c cord/tests/de_win.h \
+  include/cord_pos.h cord/tests/de_win.c cord/tests/de_win.h \
   cord/tests/de_cmds.h cord/tests/de_win.rc
 
 CORD_OBJS= cord/cordbscs.o cord/cordxtra.o cord/cordprnt.o
@@ -148,7 +148,7 @@ OTHER_FILES= tools/setjmp_t.c tools/callprocs.sh extra/MacOS.c \
   $(TESTS) $(GNU_BUILD_FILES) $(OTHER_MAKEFILES)
 
 CORD_INCLUDE_FILES= $(srcdir)/include/gc.h $(srcdir)/include/cord.h \
-  $(srcdir)/include/ec.h $(srcdir)/include/private/cord_pos.h
+  $(srcdir)/include/ec.h $(srcdir)/include/cord_pos.h
 
 UTILS= if_mach if_not_there threadlibs
 
index 430e80f2f82d00819e661a9091518f1ef168dc89..b7658cca62359e93d8ecdaee3b1b763df7442f29 100644 (file)
@@ -43,7 +43,7 @@ CSRCS= reclaim.c allchblk.c misc.c alloc.c mach_dep.c os_dep.c mark_rts.c header
 
 CORD_SRCS= cord/cordbscs.c cord/cordxtra.c cord/cordprnt.c cord/tests/de.c \
     cord/tests/cordtest.c include/cord.h include/ec.h \
-    include/private/cord_pos.h cord/tests/de_win.c cord/tests/de_win.h \
+    include/cord_pos.h cord/tests/de_win.c cord/tests/de_win.h \
     cord/tests/de_cmds.h cord/tests/de_win.rc
 
 CORD_OBJS= cord/cordbscs.o cord/cordxtra.o cord/cordprnt.o
@@ -74,7 +74,7 @@ OTHER_FILES= PCR-Makefile OS2_MAKEFILE NT_MAKEFILE BCC_MAKEFILE \
            Makefile.dj doc/README.alpha doc/README.linux WCC_MAKEFILE
 
 CORD_INCLUDE_FILES= $(srcdir)/include/gc.h $(srcdir)/include/cord.h \
-       $(srcdir)/include/ec.h $(srcdir)/include/private/cord_pos.h
+       $(srcdir)/include/ec.h $(srcdir)/include/cord_pos.h
 
 UTILS= if_mach$(EXE_SUFFIX) if_not_there$(EXE_SUFFIX)
 
index 340766d33b917d246402ef43c8f5fd583f40a3cf..3cf3be985a54a92c83683a5268eb871cdd0907ce 100644 (file)
@@ -37,7 +37,7 @@ gctest.exe: tests\test.obj gc.lib
 cord\de_win.rbj: cord\de_win.res
        cvtres /MACHINE:$(MY_CPU) /OUT:cord\de_win.rbj cord\de_win.res
 
-cord\tests\de.obj cord\tests\de_win.obj: include\cord.h include\private\cord_pos.h cord\tests\de_win.h cord\tests\de_cmds.h
+cord\tests\de.obj cord\tests\de_win.obj: include\cord.h include\cord_pos.h cord\tests\de_win.h cord\tests\de_cmds.h
 
 cord\de_win.res: cord\tests\de_win.rc cord\tests\de_win.h cord\tests\de_cmds.h
        $(rc) $(rcvars) -r -fo cord\de_win.res cord\tests\de_win.rc
index 8bb375b2a69c462e98973c8f20b84b6394e98811..8774eab12f88c2bbaccd21799548fc0c1e57f936 100644 (file)
@@ -44,7 +44,7 @@ gctest.exe: tests\test.obj gc.lib
 cord\de_win.rbj: cord\de_win.res
        cvtres /MACHINE:$(MY_CPU) /OUT:cord\de_win.rbj cord\de_win.res
 
-cord\tests\de.obj cord\tests\de_win.obj: include\cord.h include\private\cord_pos.h cord\tests\de_win.h cord\tests\de_cmds.h
+cord\tests\de.obj cord\tests\de_win.obj: include\cord.h include\cord_pos.h cord\tests\de_win.h cord\tests\de_cmds.h
 
 cord\de_win.res: cord\tests\de_win.rc cord\tests\de_win.h cord\tests\de_cmds.h
        $(rc) $(rcvars) -r -fo cord\de_win.res cord\tests\de_win.rc
index 2574a621ff29a01012606cb5348f984617450f24..3ccb75d45a392320d900c1e396fd822382243ced 100644 (file)
@@ -43,7 +43,7 @@ gctest.exe: tests\test.obj gc.lib
 cord\de_win.rbj: cord\de_win.res
        cvtres /MACHINE:$(MY_CPU) /OUT:cord\de_win.rbj cord\de_win.res
 
-cord\tests\de.obj cord\tests\de_win.obj: include\cord.h include\private\cord_pos.h cord\tests\de_win.h cord\tests\de_cmds.h
+cord\tests\de.obj cord\tests\de_win.obj: include\cord.h include\cord_pos.h cord\tests\de_win.h cord\tests\de_cmds.h
 
 cord\de_win.res: cord\tests\de_win.rc cord\tests\de_win.h cord\tests\de_cmds.h
        $(rc) $(rcvars) -r -fo cord\de_win.res cord\tests\de_win.rc
index 45c27d59db69da485bdabd678a8e8dc4688a8d40..d56dd5b59b1f8f508c32a6b5bb16555972be0c59 100644 (file)
@@ -58,7 +58,7 @@ gctest.exe: tests\test.obj gc64_dll.lib
 cord\de_win.rbj: cord\de_win.res
        cvtres /MACHINE:$(MY_CPU) /OUT:cord\de_win.rbj cord\de_win.res
 
-cord\tests\de.obj cord\tests\de_win.obj: include\cord.h include\private\cord_pos.h cord\tests\de_win.h cord\tests\de_cmds.h
+cord\tests\de.obj cord\tests\de_win.obj: include\cord.h include\cord_pos.h cord\tests\de_win.h cord\tests\de_cmds.h
 
 cord\de_win.res: cord\tests\de_win.rc cord\tests\de_win.h cord\tests\de_cmds.h
        $(rc) $(rcvars) -r -fo cord\de_win.res cord\tests\de_win.rc
index d4cdd54dcb41398aad79b4ea4f2cdc460c887062..acfcd566d7e8704c2d4d69e6bfd24c257c3816e8 100644 (file)
@@ -32,14 +32,14 @@ mach_dep.obj: mach_dep.c
 gctest.exe: test.obj gc.lib
         $(CC) $(CFLAGS) /B"/STACK:524288" /Fegctest test.obj gc.lib
 
-cord\cordbscs.obj: cord\cordbscs.c include\cord.h include\private\cord_pos.h
+cord\cordbscs.obj: cord\cordbscs.c include\cord.h include\cord_pos.h
         $(CC) $(CFLAGS) /C /Focord\cordbscs cord\cordbscs.c
 
-cord\cordxtra.obj: cord\cordxtra.c include\cord.h include\private\cord_pos.h include\ec.h
+cord\cordxtra.obj: cord\cordxtra.c include\cord.h include\cord_pos.h include\ec.h
         $(CC) $(CFLAGS) /C /Focord\cordxtra cord\cordxtra.c
 
-cord\cordprnt.obj: cord\cordprnt.c include\cord.h include\private\cord_pos.h include\ec.h
+cord\cordprnt.obj: cord\cordprnt.c include\cord.h include\cord_pos.h include\ec.h
         $(CC) $(CFLAGS) /C /Focord\cordprnt cord\cordprnt.c
 
-cord\cordtest.exe: cord\tests\cordtest.c include\cord.h include\private\cord_pos.h include\ec.h $(CORDOBJS) gc.lib
+cord\cordtest.exe: cord\tests\cordtest.c include\cord.h include\cord_pos.h include\ec.h $(CORDOBJS) gc.lib
         $(CC) $(CFLAGS) /B"/STACK:65536" /Fecord\cordtest cord\tests\cordtest.c gc.lib $(CORDOBJS)
diff --git a/gc.mak b/gc.mak
index 50fe90374efb74b5add6271853fecafc93f71569..9f92d381dd4741266bf89e9db262b5d19dd38d10 100644 (file)
--- a/gc.mak
+++ b/gc.mak
@@ -2143,7 +2143,7 @@ DEP_CPP_DE_WI=\
        ".\include\cord.h"\
        ".\cord\tests\de_cmds.h"\
        ".\cord\tests\de_win.h"\
-       ".\include\private\cord_pos.h"\
+       ".\include\cord_pos.h"\
 
 NODEP_CPP_DE_WI=\
        ".\include\gc.h"\
@@ -2174,7 +2174,7 @@ DEP_CPP_DE_C2e=\
        ".\include\cord.h"\
        ".\cord\tests\de_cmds.h"\
        ".\cord\tests\de_win.h"\
-       ".\include\private\cord_pos.h"\
+       ".\include\cord_pos.h"\
 
 NODEP_CPP_DE_C2e=\
        ".\include\gc.h"\
@@ -2204,7 +2204,7 @@ SOURCE=.\cord\cordxtra.c
 DEP_CPP_CORDX=\
        ".\include\cord.h"\
        ".\include\ec.h"\
-       ".\include\private\cord_pos.h"\
+       ".\include\cord_pos.h"\
 
 NODEP_CPP_CORDX=\
        ".\include\gc.h"\
@@ -2233,7 +2233,7 @@ NODEP_CPP_CORDX=\
 SOURCE=.\cord\cordbscs.c
 DEP_CPP_CORDB=\
        ".\include\cord.h"\
-       ".\include\private\cord_pos.h"\
+       ".\include\cord_pos.h"\
 
 NODEP_CPP_CORDB=\
        ".\include\gc.h"\
index 74b6c98611ff9378f3ede282e019e7783e127a7a..05eb4c4c1ef55324f8b11029d67d432063a82eab 100644 (file)
@@ -179,7 +179,7 @@ CORD_API int CORD_riter(CORD x, CORD_iter_fn f1, void * client_data);
 /* described below.  Also note that                                     */
 /* CORD_pos_fetch, CORD_next and CORD_prev have both macro and function */
 /* definitions.  The former may evaluate their argument more than once. */
-#include "private/cord_pos.h"
+#include "cord_pos.h"
 
 /*
         Visible definitions from above:
similarity index 96%
rename from include/private/cord_pos.h
rename to include/cord_pos.h
index ce4be854ba264ead8af2597645ad23211014a3f4..beaa2368e3cc125db004b52601c779498e290d62 100644 (file)
@@ -11,7 +11,9 @@
  * modified is included with the above copyright notice.
  */
 
-# ifndef CORD_POSITION_H
+/* This should never be included directly; included only from cord.h.   */
+#if !defined(CORD_POSITION_H) && defined(CORD_H)
+#define CORD_POSITION_H
 
 /* The representation of CORD_position.  This is private to the */
 /* implementation, but the size is known to clients.  Also      */
index 815640a324ff8fcc8eca2d98bbd262aa9a5a260a..1b2a557b0e89f391048d909507c1497f1ae8c755 100644 (file)
@@ -33,9 +33,9 @@ pkginclude_HEADERS += \
 #
 dist_noinst_HEADERS += \
         include/cord.h \
+        include/cord_pos.h \
         include/ec.h \
         include/new_gc_alloc.h \
-        include/private/cord_pos.h \
         include/private/darwin_semaphore.h \
         include/private/darwin_stop_world.h \
         include/private/dbg_mlc.h \