Преглед изворни кода

reorganize include file to match installed tree to build openais without installing corosync; correct some warnings and error under FreeBSD and Darwin

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1632 fd59a12c-fef9-0310-b244-a6a79926bd2f
Fabien Thomas пре 17 година
родитељ
комит
0c92a5e564
97 измењених фајлова са 300 додато и 294 уклоњено
  1. 14 15
      Makefile
  2. 1 1
      Makefile.inc
  3. 5 5
      exec/Makefile
  4. 7 7
      exec/apidef.c
  5. 2 2
      exec/apidef.h
  6. 4 3
      exec/coroparse.c
  7. 3 3
      exec/coropoll.c
  8. 7 6
      exec/flow.c
  9. 12 12
      exec/ipc.c
  10. 4 4
      exec/logsys.c
  11. 11 12
      exec/main.c
  12. 8 9
      exec/main.h
  13. 5 4
      exec/mainconfig.c
  14. 3 3
      exec/mainconfig.h
  15. 1 1
      exec/mempool.c
  16. 1 1
      exec/mempool.h
  17. 7 5
      exec/objdb.c
  18. 9 8
      exec/service.c
  19. 7 6
      exec/sync.c
  20. 1 1
      exec/sync.h
  21. 12 12
      exec/timer.c
  22. 1 1
      exec/tlist.h
  23. 7 5
      exec/totemconfig.c
  24. 9 8
      exec/totemconfig.h
  25. 3 2
      exec/totemip.c
  26. 3 2
      exec/totemmrp.c
  27. 1 1
      exec/totemmrp.h
  28. 6 6
      exec/totemnet.c
  29. 1 1
      exec/totemnet.h
  30. 6 5
      exec/totempg.c
  31. 7 6
      exec/totemrrp.c
  32. 1 1
      exec/totemrrp.h
  33. 6 6
      exec/totemsrp.c
  34. 2 2
      exec/totemsrp.h
  35. 3 3
      exec/util.c
  36. 3 2
      exec/util.h
  37. 4 3
      exec/vsf_ykd.c
  38. 2 1
      exec/wthread.c
  39. 0 4
      include/corosync/ais_util.h
  40. 0 0
      include/corosync/cfg.h
  41. 0 0
      include/corosync/confdb.h
  42. 0 0
      include/corosync/cpg.h
  43. 0 0
      include/corosync/engine/config.h
  44. 3 0
      include/corosync/engine/coroapi.h
  45. 2 2
      include/corosync/engine/logsys.h
  46. 0 0
      include/corosync/engine/objdb.h
  47. 0 0
      include/corosync/evs.h
  48. 0 0
      include/corosync/hdb.h
  49. 0 0
      include/corosync/ipc_cfg.h
  50. 0 0
      include/corosync/ipc_confdb.h
  51. 0 0
      include/corosync/ipc_cpg.h
  52. 0 0
      include/corosync/ipc_evs.h
  53. 0 4
      include/corosync/ipc_gen.h
  54. 0 0
      include/corosync/jhash.h
  55. 0 0
      include/corosync/lcr/lcr_ckpt.h
  56. 0 0
      include/corosync/lcr/lcr_comp.h
  57. 0 0
      include/corosync/lcr/lcr_ifact.h
  58. 0 0
      include/corosync/list.h
  59. 0 0
      include/corosync/mar_cpg.h
  60. 2 6
      include/corosync/mar_gen.h
  61. 0 0
      include/corosync/queue.h
  62. 0 0
      include/corosync/rmd.h
  63. 0 0
      include/corosync/saAis.h
  64. 0 0
      include/corosync/sq.h
  65. 0 0
      include/corosync/swab.h
  66. 0 0
      include/corosync/totem/coropoll.h
  67. 0 0
      include/corosync/totem/totem.h
  68. 0 0
      include/corosync/totem/totemip.h
  69. 0 0
      include/corosync/totem/totempg.h
  70. 0 1
      lcr/Makefile
  71. 3 3
      lcr/lcr_ifact.c
  72. 1 1
      lcr/libtest_a.c
  73. 1 1
      lcr/libtest_b.c
  74. 1 1
      lcr/test.c
  75. 2 3
      lib/Makefile
  76. 6 6
      lib/cfg.c
  77. 6 6
      lib/confdb.c
  78. 5 5
      lib/cpg.c
  79. 6 6
      lib/evs.c
  80. 7 7
      lib/sa-confdb.c
  81. 3 3
      lib/util.c
  82. 5 5
      services/Makefile
  83. 10 10
      services/cfg.c
  84. 10 7
      services/confdb.c
  85. 11 13
      services/cpg.c
  86. 8 8
      services/evs.c
  87. 1 1
      test/Makefile
  88. 2 2
      test/cpgbench.c
  89. 2 2
      test/evsbench.c
  90. 2 2
      test/testconfdb.c
  91. 2 2
      test/testcpg.c
  92. 2 1
      test/testcpg2.c
  93. 1 1
      test/testevs.c
  94. 2 2
      tools/Makefile
  95. 2 2
      tools/corosync-cfgtool.c
  96. 0 0
      tools/corosync-keygen.c
  97. 3 2
      tools/corosync-objctl.c

+ 14 - 15
Makefile

@@ -175,29 +175,28 @@ install: all
 	install -m 755 $(builddir)exec/corosync $(DESTDIR)$(SBINDIR)
 	install -m 755 $(builddir)tools/corosync-objctl $(DESTDIR)$(SBINDIR)
 	install -m 755 $(builddir)tools/corosync-cfgtool $(DESTDIR)$(SBINDIR)
-	install -m 700 $(builddir)tools/keygen $(DESTDIR)$(SBINDIR)/corosync-keygen
+	install -m 700 $(builddir)tools/corosync-keygen $(DESTDIR)$(SBINDIR)
 
 	if [ ! -f $(DESTDIR)$(ETCDIR)/penais.conf ] ; then 	   \
 		install -m 644 $(srcdir)conf/corosync.conf $(DESTDIR)$(ETCDIR) ; \
 	fi
 
 	for aHeader in $(AIS_HEADERS); do				\
-	    install -m 644 $(srcdir)include/$$aHeader $(DESTDIR)$(INCLUDEDIR);	\
+	    install -m 644 $(srcdir)include/corosync/$$aHeader $(DESTDIR)$(INCLUDEDIR);	\
 	done
 
-	install -m 644 $(srcdir)include/hdb.h $(DESTDIR)$(INCLUDEDIR)
-	install -m 644 $(srcdir)exec/coropoll.h $(DESTDIR)$(INCLUDEDIR_TOTEM)
-	install -m 644 $(srcdir)exec/totempg.h $(DESTDIR)$(INCLUDEDIR_TOTEM)
-	install -m 644 $(srcdir)exec/totem.h $(DESTDIR)$(INCLUDEDIR_TOTEM)
-	install -m 644 $(srcdir)exec/totemip.h $(DESTDIR)$(INCLUDEDIR_TOTEM)
-	install -m 644 $(srcdir)lcr/lcr_ckpt.h $(DESTDIR)$(INCLUDEDIR_LCR)
-	install -m 644 $(srcdir)lcr/lcr_comp.h $(DESTDIR)$(INCLUDEDIR_LCR)
-	install -m 644 $(srcdir)lcr/lcr_ifact.h $(DESTDIR)$(INCLUDEDIR_LCR)
-	install -m 644 $(srcdir)include/coroapi.h $(DESTDIR)$(INCLUDEDIR_ENGINE)
-	install -m 644 $(srcdir)exec/objdb.h $(DESTDIR)$(INCLUDEDIR_ENGINE)
-	install -m 644 $(srcdir)exec/logsys.h $(DESTDIR)$(INCLUDEDIR_ENGINE)
-	install -m 644 $(srcdir)exec/config.h $(DESTDIR)$(INCLUDEDIR_ENGINE)
-	install -m 644 $(srcdir)include/swab.h $(DESTDIR)$(INCLUDEDIR_ENGINE)
+	install -m 644 $(srcdir)include/corosync/hdb.h $(DESTDIR)$(INCLUDEDIR)
+	install -m 644 $(srcdir)include/corosync/totem/coropoll.h $(DESTDIR)$(INCLUDEDIR_TOTEM)
+	install -m 644 $(srcdir)include/corosync/totem/totempg.h $(DESTDIR)$(INCLUDEDIR_TOTEM)
+	install -m 644 $(srcdir)include/corosync/totem/totem.h $(DESTDIR)$(INCLUDEDIR_TOTEM)
+	install -m 644 $(srcdir)include/corosync/totem/totemip.h $(DESTDIR)$(INCLUDEDIR_TOTEM)
+	install -m 644 $(srcdir)include/corosync/lcr/lcr_ckpt.h $(DESTDIR)$(INCLUDEDIR_LCR)
+	install -m 644 $(srcdir)include/corosync/lcr/lcr_comp.h $(DESTDIR)$(INCLUDEDIR_LCR)
+	install -m 644 $(srcdir)include/corosync/lcr/lcr_ifact.h $(DESTDIR)$(INCLUDEDIR_LCR)
+	install -m 644 $(srcdir)include/corosync/engine/coroapi.h $(DESTDIR)$(INCLUDEDIR_ENGINE)
+	install -m 644 $(srcdir)include/corosync/engine/objdb.h $(DESTDIR)$(INCLUDEDIR_ENGINE)
+	install -m 644 $(srcdir)include/corosync/engine/logsys.h $(DESTDIR)$(INCLUDEDIR_ENGINE)
+	install -m 644 $(srcdir)include/corosync/engine/config.h $(DESTDIR)$(INCLUDEDIR_ENGINE)
 	install -m 644 $(srcdir)man/*.3 $(DESTDIR)$(MANDIR)/man3
 	install -m 644 $(srcdir)man/*.5 $(DESTDIR)$(MANDIR)/man5
 	install -m 644 $(srcdir)man/*.8 $(DESTDIR)$(MANDIR)/man8

+ 1 - 1
Makefile.inc

@@ -45,7 +45,7 @@ endif
 
 # default CFLAGS, LDFLAGS
 #
-CFLAGS =
+CFLAGS = -DLCRSODIR='"$(LCRSODIR)"'
 LDFLAGS =
 DYFLAGS =
 

+ 5 - 5
exec/Makefile

@@ -36,7 +36,7 @@ subdir ?= exec/
 
 include $(srcdir)Makefile.inc
 
-LDFLAGS += -L./
+override LDFLAGS += -L./ ${DYFLAGS}
 
 ifeq (${BUILD_DYNAMIC}, 1) 
 	override LDFLAGS += ${DYFLAGS}
@@ -60,7 +60,7 @@ EXEC_LIBS = libtotem_pg.a liblogsys.a
 
 # LCR objects
 LCR_SRC = vsf_ykd.c objdb.c coroparse.c
-LCR_OBJS =aisparser.o vsf_ykd.o objdb.o coroparse.o
+LCR_OBJS = vsf_ykd.o objdb.o coroparse.o
 
 # main executive objects
 MAIN_SRC = main.c mempool.c util.c sync.c apidef.c service.c ipc.c flow.c \
@@ -74,7 +74,7 @@ EXEC_OBJS = $(MAIN_OBJS)
 override CFLAGS += -fPIC
 
 all:libtotem_pg.a libtotem_pg.so.2.0.0 liblogsys.a liblogsys.so.2.0.0 \
-	../lcr/lcr_ifact.o corosync \
+	../lcr/lcr_ifact.o corosync_ \
 	objdb.lcrso vsf_ykd.lcrso coroparse.lcrso
 else
 EXEC_OBJS = $(MAIN_OBJS) $(LCR_OBJS)
@@ -105,7 +105,7 @@ coroparse.lcrso: coroparse.o
 	$(CC) -shared -Wl,-soname,coroparse.lcrso coroparse.o -o $@
 endif
 
-corosync: $(EXEC_OBJS) $(EXEC_LIBS)
+corosync_: $(EXEC_OBJS) $(EXEC_LIBS)
 	$(CC) $(EXEC_OBJS) $(EXEC_LIBS) -o corosync $(LDFLAGS)
 
 libtotem_pg.a: $(TOTEM_OBJS)
@@ -140,7 +140,7 @@ depend:
 
 # - fPIC rules required for service handler shared objects
 ../lcr/lcr_ifact.o: $(srcdir)lcr/lcr_ifact.c
-	$(CC) $(CFLAGS) $(CPPFLAGS) -DPREFIX='"$(PREFIX)"' -DLCRSODIR='"$(LCRSODIR)"' -I../lcr -c -o $@ $<
+	$(CC) $(CFLAGS) $(CPPFLAGS) -DPREFIX='"$(PREFIX)"' -c -o $@ $<
 
 vsf_ykd.o: vsf_ykd.c
 	$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<

+ 7 - 7
exec/apidef.c

@@ -36,18 +36,18 @@
 #include <string.h>
 #include <assert.h>
 
-#include "swab.h"
-#include "totem.h"
+#include <corosync/swab.h>
+#include <corosync/totem/totem.h>
 #include "util.h"
-#include "logsys.h"
+#include <corosync/engine/logsys.h>
 #include "timer.h"
-#include "totempg.h"
-#include "totemip.h"
+#include <corosync/totem/totempg.h>
+#include <corosync/totem/totemip.h>
 #include "main.h"
 #include "ipc.h"
-#include "../include/coroapi.h"
+#include <corosync/engine/coroapi.h>
 #include "service.h"
-#include "../lcr/lcr_ifact.h"
+#include <corosync/lcr/lcr_ifact.h>
 
 LOGSYS_DECLARE_SUBSYS ("APIDEF", LOG_INFO);
 

+ 2 - 2
exec/apidef.h

@@ -35,8 +35,8 @@
 #ifndef APIDEF_H_DEFINED
 #define APIDEF_H_DEFINED
 
-#include "objdb.h"
-#include "../include/coroapi.h"
+#include <corosync/engine/objdb.h>
+#include <corosync/engine/coroapi.h>
 
 void apidef_init (struct objdb_iface_ver0 *objdb);
 

+ 4 - 3
exec/coroparse.c

@@ -45,9 +45,10 @@
 #include <signal.h>
 #include <string.h>
 
-#include "../lcr/lcr_comp.h"
-#include "objdb.h"
-#include "config.h"
+#include <corosync/lcr/lcr_comp.h>
+#include <corosync/engine/objdb.h>
+#include <corosync/engine/config.h>
+
 #include "mempool.h"
 #include "util.h"
 

+ 3 - 3
exec/coropoll.c

@@ -39,9 +39,9 @@
 #include <string.h>
 #include <stdio.h>
 
-#include "coropoll.h"
-#include "../include/list.h"
-#include "../include/hdb.h"
+#include <corosync/totem/coropoll.h>
+#include <corosync/list.h>
+#include <corosync/hdb.h>
 #include "tlist.h"
 
 typedef int (*dispatch_fn_t) (poll_handle poll_handle, int fd, int revents, void *data);

+ 7 - 6
exec/flow.c

@@ -46,13 +46,14 @@
 #include <assert.h>
 #include <pthread.h>
 
-#include "swab.h"
+#include <corosync/swab.h>
+#include <corosync/list.h>
+#include <corosync/hdb.h>
+#include <corosync/totem/totem.h>
+#include <corosync/totem/totempg.h>
+#include <corosync/engine/logsys.h>
+
 #include "flow.h"
-#include "totem.h"
-#include "totempg.h"
-#include "logsys.h"
-#include "hdb.h"
-#include "../include/list.h"
 
 LOGSYS_DECLARE_SUBSYS ("FLOW", LOG_INFO);
 

+ 12 - 12
exec/ipc.c

@@ -61,13 +61,18 @@
 #include <ucred.h>
 #endif
 
-#include "swab.h"
-#include "../include/saAis.h"
-#include "../include/list.h"
-#include "../include/queue.h"
-#include "../lcr/lcr_ifact.h"
+#include <corosync/swab.h>
+#include <corosync/saAis.h>
+#include <corosync/list.h>
+#include <corosync/queue.h>
+#include <corosync/lcr/lcr_ifact.h>
+#include <corosync/totem/coropoll.h>
+#include <corosync/totem/totempg.h>
+#include <corosync/engine/objdb.h>
+#include <corosync/engine/config.h>
+#include <corosync/engine/logsys.h>
+
 #include "poll.h"
-#include "totempg.h"
 #include "totemsrp.h"
 #include "mempool.h"
 #include "mainconfig.h"
@@ -78,12 +83,7 @@
 #include "ipc.h"
 #include "flow.h"
 #include "sync.h"
-#include "swab.h"
-#include "objdb.h"
-#include "config.h"
-#include "tlist.h"
-#include "logsys.h"
-#include "coroapi.h"
+#include <corosync/engine/coroapi.h>
 #include "service.h"
 
 #include "util.h"

+ 4 - 4
exec/logsys.c

@@ -53,7 +53,7 @@
 #include <stdlib.h>
 #include <pthread.h>
 
-#include "logsys.h"
+#include <corosync/engine/logsys.h>
 #include "wthread.h"
 
 /*
@@ -136,7 +136,7 @@ int logsys_facility_id_get (const char *name)
 	return (-1);
 }
 
-char *logsys_facility_name_get (unsigned int facility)
+const char *logsys_facility_name_get (unsigned int facility)
 {
 	unsigned int i;
 
@@ -160,7 +160,7 @@ int logsys_priority_id_get (const char *name)
 	return (-1);
 }
 
-char *logsys_priority_name_get (unsigned int priority)
+const char *logsys_priority_name_get (unsigned int priority)
 {
 	unsigned int i;
 
@@ -326,7 +326,7 @@ static void _log_printf (
 		(logsys_mode & LOG_MODE_DISPLAY_TIMESTAMP)) {
 		gettimeofday (&tv, NULL);
 		strftime (char_time, sizeof (char_time), "%b %e %k:%M:%S",
-				  localtime (&tv.tv_sec));
+				  localtime ((time_t *)&tv.tv_sec));
 		i = sprintf (newstring, "%s.%06ld ", char_time, (long)tv.tv_usec);
 	}
 

+ 11 - 12
exec/main.c

@@ -55,30 +55,29 @@
 #include <sched.h>
 #include <time.h>
 
-#include "swab.h"
-#include "../include/saAis.h"
-#include "../include/list.h"
-#include "../include/queue.h"
-#include "../lcr/lcr_ifact.h"
-#include "coropoll.h"
-#include "totempg.h"
+#include <corosync/swab.h>
+#include <corosync/saAis.h>
+#include <corosync/list.h>
+#include <corosync/queue.h>
+#include <corosync/lcr/lcr_ifact.h>
+#include <corosync/totem/coropoll.h>
+#include <corosync/totem/totempg.h>
+#include <corosync/engine/objdb.h>
+#include <corosync/engine/config.h>
+#include <corosync/engine/logsys.h>
+
 #include "totemsrp.h"
 #include "mempool.h"
 #include "mainconfig.h"
 #include "totemconfig.h"
 #include "main.h"
 #include "sync.h"
-#include "swab.h"
-#include "objdb.h"
-#include "config.h"
 #include "tlist.h"
 #include "flow.h"
 #include "ipc.h"
 #include "timer.h"
-#include "logsys.h"
 #include "util.h"
 #include "flow.h"
-#include "coroapi.h"
 #include "apidef.h"
 #include "service.h"
 #include "version.h"

+ 8 - 9
exec/main.h

@@ -32,18 +32,17 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
+#ifndef AIS_EXEC_H_DEFINED
+#define AIS_EXEC_H_DEFINED
 
 #define TRUE 1
 #define FALSE 0
-#include "../include/saAis.h"
-#include "../include/ipc_gen.h"
-#include "coropoll.h"
-#include "objdb.h"
-#include "config.h"
-#include "totempg.h"
-
-#ifndef AIS_EXEC_H_DEFINED
-#define AIS_EXEC_H_DEFINED
+#include <corosync/saAis.h>
+#include <corosync/ipc_gen.h>
+#include <corosync/totem/coropoll.h>
+#include <corosync/totem/totempg.h>
+#include <corosync/engine/objdb.h>
+#include <corosync/engine/config.h>
 
 /*
  * Size of the queue (entries) for I/O's to the API over socket IPC.

+ 5 - 4
exec/mainconfig.c

@@ -41,13 +41,14 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
-#include "../include/saAis.h"
-#include "../include/list.h"
+#include <corosync/saAis.h>
+#include <corosync/list.h>
+#include <corosync/totem/totem.h>
+#include <corosync/engine/logsys.h>
+
 #include "util.h"
 #include "mainconfig.h"
 #include "mempool.h"
-#include "logsys.h"
-#include "totem.h"
 
 static char error_string_response[512];
 

+ 3 - 3
exec/mainconfig.h

@@ -32,12 +32,12 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
-#include "objdb.h"
-#include "logsys.h"
-
 #ifndef MAINCONFIG_H_DEFINED
 #define MAINCONFIG_H_DEFINED
 
+#include <corosync/engine/objdb.h>
+#include <corosync/engine/logsys.h>
+
 /*
  * All service handlers in the AIS
  */

+ 1 - 1
exec/mempool.c

@@ -36,7 +36,7 @@
 #include <string.h>
 #include <errno.h>
 
-#include "../include/list.h"
+#include <corosync/list.h>
 #include "mempool.h"
 
 int mempool_bytes = 0;

+ 1 - 1
exec/mempool.h

@@ -32,7 +32,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "../include/list.h"
+#include <corosync/list.h>
 
 #ifndef MEMPOOL_H_DEFINED
 #define MEMPOOL_H_DEFINED

+ 7 - 5
exec/objdb.c

@@ -35,12 +35,14 @@
 
 #include <stdio.h>
 #include <errno.h>
-#include "objdb.h"
-#include "config.h"
+
+#include <corosync/list.h>
+#include <corosync/hdb.h>
+#include <corosync/lcr/lcr_comp.h>
+#include <corosync/engine/objdb.h>
+#include <corosync/engine/config.h>
+
 #include "main.h"
-#include "../lcr/lcr_comp.h"
-#include "../include/hdb.h"
-#include "../include/list.h"
 
 struct object_key {
 	void *key_name;

+ 9 - 8
exec/service.c

@@ -37,19 +37,20 @@
 #include <string.h>
 #include <assert.h>
 
-#include "../lcr/lcr_ifact.h"
-#include "swab.h"
-#include "totem.h"
+#include <corosync/lcr/lcr_ifact.h>
+#include <corosync/swab.h>
+#include <corosync/totem/totem.h>
+
 #include "mainconfig.h"
 #include "util.h"
-#include "logsys.h"
+#include <corosync/engine/logsys.h>
 
 #include "timer.h"
-#include "totempg.h"
-#include "totemip.h"
+#include <corosync/totem/totempg.h>
+#include <corosync/totem/totemip.h>
 #include "main.h"
 #include "ipc.h"
-#include "../include/coroapi.h"
+#include <corosync/engine/coroapi.h>
 #include "service.h"
 
 
@@ -143,7 +144,7 @@ unsigned int openais_service_link_and_init (
 		&iface_ver0_p,
 		(void *)0);
 
-	iface_ver0 = (struct openais_service_engine_iface_ver0 *)iface_ver0_p;
+	iface_ver0 = (struct corosync_service_engine_iface_ver0 *)iface_ver0_p;
 
 	if (iface_ver0 == 0) {
 		log_printf(LOG_LEVEL_ERROR, "Service failed to load '%s'.\n", service_name);

+ 7 - 6
exec/sync.c

@@ -49,15 +49,16 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
-#include "../include/saAis.h"
+#include <corosync/saAis.h>
+#include <corosync/swab.h>
+#include <corosync/totem/totempg.h>
+#include <corosync/totem/totem.h>
+#include <corosync/lcr/lcr_ifact.h>
+#include <corosync/engine/logsys.h>
+
 #include "main.h"
 #include "sync.h"
-#include "totempg.h"
-#include "totem.h"
 #include "vsf.h"
-#include "swab.h"
-#include "../lcr/lcr_ifact.h"
-#include "logsys.h"
 
 LOGSYS_DECLARE_SUBSYS ("SYNC", LOG_INFO);
 

+ 1 - 1
exec/sync.h

@@ -36,7 +36,7 @@
 #define SYNC_H_DEFINED
 
 #include <netinet/in.h>
-#include "totempg.h"
+#include <corosync/totem/totempg.h>
 #include "totemsrp.h"
 
 struct sync_callbacks {

+ 12 - 12
exec/timer.c

@@ -55,26 +55,26 @@
 #include <sched.h>
 #include <time.h>
 
-#include "swab.h"
-#include "../include/saAis.h"
-#include "../include/list.h"
-#include "../include/queue.h"
-#include "../lcr/lcr_ifact.h"
+#include <corosync/swab.h>
+#include <corosync/saAis.h>
+#include <corosync/list.h>
+#include <corosync/queue.h>
+#include <corosync/lcr/lcr_ifact.h>
+#include <corosync/totem/coropoll.h>
+#include <corosync/totem/totempg.h>
+#include <corosync/engine/objdb.h>
+#include <corosync/engine/config.h>
+#define LOG_SERVICE LOG_SERVICE_IPC
+#include <corosync/engine/logsys.h>
+
 #include "poll.h"
-#include "totempg.h"
 #include "totemsrp.h"
 #include "mempool.h"
 #include "mainconfig.h"
 #include "totemconfig.h"
 #include "main.h"
 #include "sync.h"
-#include "swab.h"
-#include "objdb.h"
-#include "config.h"
 #include "tlist.h"
-#define LOG_SERVICE LOG_SERVICE_IPC
-#include "logsys.h"
-
 #include "util.h"
 
 #define SERVER_BACKLOG 5

+ 1 - 1
exec/tlist.h

@@ -43,7 +43,7 @@
 #include <string.h>
 #include <sys/param.h>
 
-#include "../include/list.h"
+#include <corosync/list.h>
 
 #ifndef HZ
 	#define HZ 100  /* 10ms */

+ 7 - 5
exec/totemconfig.c

@@ -46,13 +46,15 @@
 #include <arpa/inet.h>
 #include <sys/param.h>
 
-#include "swab.h"
-#include "list.h"
+#include <corosync/swab.h>
+#include <corosync/list.h>
+#include <corosync/totem/totem.h>
+#include <corosync/engine/objdb.h>
+#include <corosync/engine/config.h>
+#include <corosync/engine/logsys.h>
+
 #include "util.h"
-#include "totem.h"
 #include "totemconfig.h"
-#include "logsys.h"
-#include "objdb.h"
 #include "tlist.h" /* for HZ */
 
 #define TOKEN_RETRANSMITS_BEFORE_LOSS_CONST	4

+ 9 - 8
exec/totemconfig.h

@@ -32,17 +32,18 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
-#include <netinet/in.h>
-#include "../include/saAis.h"
-#include "../include/list.h"
-#include "coropoll.h"
-#include "totemsrp.h"
-#include "totempg.h"
-#include "objdb.h"
-
 #ifndef TOTEMCONFIG_H_DEFINED
 #define TOTEMCONFIG_H_DEFINED
 
+#include <netinet/in.h>
+#include <corosync/saAis.h>
+#include <corosync/list.h>
+#include <corosync/totem/coropoll.h>
+#include <corosync/totem/totempg.h>
+#include <corosync/engine/objdb.h>
+
+#include "totemsrp.h"
+
 extern int totem_config_read (
 	struct objdb_iface_ver0 *objdb,
 	struct totem_config *totem_config,

+ 3 - 2
exec/totemip.c

@@ -66,8 +66,8 @@
 #define s6_addr16 __u6_addr.__u6_addr16
 #endif
 
-#include "totemip.h"
-#include "swab.h"
+#include <corosync/totem/totemip.h>
+#include <corosync/swab.h>
 
 #define LOCALHOST_IPV4 "127.0.0.1"
 #define LOCALHOST_IPV6 "::1"
@@ -167,6 +167,7 @@ int totemip_compare(const void *a, const void *b)
 	 	 */
 		assert (0);
 	}
+	return 0;
 }
 
 /* Build a localhost totem_ip_address */

+ 3 - 2
exec/totemmrp.c

@@ -54,9 +54,10 @@
 #include <sys/time.h>
 #include <sys/poll.h>
 
-#include "totem.h"
+#include <corosync/totem/totem.h>
+#include <corosync/totem/coropoll.h>
+
 #include "totemsrp.h"
-#include "coropoll.h"
 
 totemsrp_handle totemsrp_handle_in;
 

+ 1 - 1
exec/totemmrp.h

@@ -35,7 +35,7 @@
 #ifndef TOTEMMRP_H_DEFINED
 #define TOTEMMRP_H_DEFINED
 
-#include "totem.h"
+#include <corosync/totem/totem.h>
 
 /*
  * Totem Single Ring Protocol

+ 6 - 6
exec/totemnet.c

@@ -56,14 +56,14 @@
 #include <sys/time.h>
 #include <sys/poll.h>
 
-#include "coropoll.h"
+#include <corosync/queue.h>
+#include <corosync/sq.h>
+#include <corosync/list.h>
+#include <corosync/hdb.h>
+#include <corosync/swab.h>
+#include <corosync/totem/coropoll.h>
 #include "totemnet.h"
 #include "wthread.h"
-#include "../include/queue.h"
-#include "../include/sq.h"
-#include "../include/list.h"
-#include "../include/hdb.h"
-#include "swab.h"
 
 #include "crypto.h"
 

+ 1 - 1
exec/totemnet.h

@@ -38,7 +38,7 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 
-#include "totem.h"
+#include <corosync/totem/totem.h>
 
 typedef unsigned int totemnet_handle;
 

+ 6 - 5
exec/totempg.c

@@ -91,13 +91,14 @@
 #include <pthread.h>
 #include <errno.h>
 
-#include "../include/hdb.h"
-#include "../include/list.h"
-#include "coropoll.h"
-#include "totempg.h"
+#include <corosync/swab.h>
+#include <corosync/hdb.h>
+#include <corosync/list.h>
+#include <corosync/totem/coropoll.h>
+#include <corosync/totem/totempg.h>
+
 #include "totemmrp.h"
 #include "totemsrp.h"
-#include "swab.h"
 
 #define min(a,b) ((a) < (b)) ? a : b
 

+ 7 - 6
exec/totemrrp.c

@@ -56,12 +56,13 @@
 #include <sys/time.h>
 #include <sys/poll.h>
 
-#include "../include/queue.h"
-#include "../include/sq.h"
-#include "../include/list.h"
-#include "../include/hdb.h"
-#include "swab.h"
-#include "coropoll.h"
+#include <corosync/queue.h>
+#include <corosync/sq.h>
+#include <corosync/list.h>
+#include <corosync/hdb.h>
+#include <corosync/swab.h>
+#include <corosync/totem/coropoll.h>
+
 #include "totemnet.h"
 #include "totemrrp.h"
 

+ 1 - 1
exec/totemrrp.h

@@ -38,7 +38,7 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 
-#include "totem.h"
+#include <corosync/totem/totem.h>
 
 typedef unsigned int totemrrp_handle;
 

+ 6 - 6
exec/totemsrp.c

@@ -69,15 +69,15 @@
 #include <sys/time.h>
 #include <sys/poll.h>
 
-#include "coropoll.h"
+#include <corosync/swab.h>
+#include <corosync/queue.h>
+#include <corosync/sq.h>
+#include <corosync/list.h>
+#include <corosync/hdb.h>
+#include <corosync/totem/coropoll.h>
 #include "totemsrp.h"
 #include "totemrrp.h"
 #include "wthread.h"
-#include "../include/queue.h"
-#include "../include/sq.h"
-#include "../include/list.h"
-#include "../include/hdb.h"
-#include "swab.h"
 
 #include "crypto.h"
 

+ 2 - 2
exec/totemsrp.h

@@ -35,8 +35,8 @@
 #ifndef TOTEMSRP_H_DEFINED
 #define TOTEMSRP_H_DEFINED
 
-#include "totem.h"
-#include "coropoll.h"
+#include <corosync/totem/totem.h>
+#include <corosync/totem/coropoll.h>
 
 typedef unsigned int totemsrp_handle;
 

+ 3 - 3
exec/util.c

@@ -39,10 +39,10 @@
 #include <errno.h>
 #include <sys/time.h>
 
-#include "../include/saAis.h"
-#include "../include/list.h"
+#include <corosync/saAis.h>
+#include <corosync/list.h>
+#include <corosync/engine/logsys.h>
 #include "util.h"
-#include "logsys.h"
 
 LOGSYS_DECLARE_SUBSYS ("MAIN", LOG_INFO);
 

+ 3 - 2
exec/util.h

@@ -34,9 +34,10 @@
  */
 #ifndef UTIL_H_DEFINED
 #define UTIL_H_DEFINED
+
 #include <sys/time.h>
-#include "../include/mar_gen.h"
-#include "../include/saAis.h"
+#include <corosync/mar_gen.h>
+#include <corosync/saAis.h>
 
 /*
  * Get the time of day and convert to nanoseconds

+ 4 - 3
exec/vsf_ykd.c

@@ -55,11 +55,12 @@
 #include <sched.h>
 #include <time.h>
 
+#include <corosync/engine/logsys.h>
+#include <corosync/swab.h>
+#include <corosync/lcr/lcr_comp.h>
+
 #include "main.h"
-#include "logsys.h"
-#include "swab.h"
 #include "vsf.h"
-#include "../lcr/lcr_comp.h"
 
 LOGSYS_DECLARE_SUBSYS ("YKD", LOG_INFO);
 

+ 2 - 1
exec/wthread.c

@@ -40,8 +40,9 @@
 #include <stdlib.h>
 #include <pthread.h>
 #include <errno.h>
+#include <corosync/queue.h>
+
 #include "wthread.h"
-#include "../include/queue.h"
 
 struct thread_data {
 	void *thread_state;

+ 0 - 4
include/ais_util.h → include/corosync/ais_util.h

@@ -38,11 +38,7 @@
 #include <sys/poll.h>
 #include <sys/socket.h>
 
-#ifdef COROSYNC_EXTERNAL_ENGINE
 #include <corosync/ipc_gen.h>
-#else
-#include <ipc_gen.h>
-#endif
 
 /* Debug macro
  */

+ 0 - 0
include/cfg.h → include/corosync/cfg.h


+ 0 - 0
include/confdb.h → include/corosync/confdb.h


+ 0 - 0
include/cpg.h → include/corosync/cpg.h


+ 0 - 0
exec/config.h → include/corosync/engine/config.h


+ 3 - 0
include/coroapi.h → include/corosync/engine/coroapi.h

@@ -35,6 +35,9 @@
 #define COROAPI_H_DEFINED
 
 #include <stdio.h>
+#ifdef OPENAIS_BSD
+#include <sys/uio.h>
+#endif
 
 typedef void * corosync_timer_handle_t;
 

+ 2 - 2
exec/logsys.h → include/corosync/engine/logsys.h

@@ -128,13 +128,13 @@ extern int logsys_config_subsys_get (
 extern int logsys_facility_id_get (
 	const char *name);
 
-extern char *logsys_facility_name_get (
+extern const char *logsys_facility_name_get (
 	unsigned int facility);
 
 extern int logsys_priority_id_get (
 	const char *name);
 
-extern char *logsys_priority_name_get (
+extern const char *logsys_priority_name_get (
 	unsigned int priority);
 
 extern void logsys_flush (void);

+ 0 - 0
exec/objdb.h → include/corosync/engine/objdb.h


+ 0 - 0
include/evs.h → include/corosync/evs.h


+ 0 - 0
include/hdb.h → include/corosync/hdb.h


+ 0 - 0
include/ipc_cfg.h → include/corosync/ipc_cfg.h


+ 0 - 0
include/ipc_confdb.h → include/corosync/ipc_confdb.h


+ 0 - 0
include/ipc_cpg.h → include/corosync/ipc_cpg.h


+ 0 - 0
include/ipc_evs.h → include/corosync/ipc_evs.h


+ 0 - 4
include/ipc_gen.h → include/corosync/ipc_gen.h

@@ -34,11 +34,7 @@
 #ifndef IPC_GEN_H_DEFINED
 #define IPC_GEN_H_DEFINED
 
-#ifdef COROSYNC_EXTERNAL_SERVICE
 #include <corosync/mar_gen.h>
-#else
-#include "mar_gen.h"
-#endif
 
 enum service_types {
 	EVS_SERVICE = 0,

+ 0 - 0
include/jhash.h → include/corosync/jhash.h


+ 0 - 0
lcr/lcr_ckpt.h → include/corosync/lcr/lcr_ckpt.h


+ 0 - 0
lcr/lcr_comp.h → include/corosync/lcr/lcr_comp.h


+ 0 - 0
lcr/lcr_ifact.h → include/corosync/lcr/lcr_ifact.h


+ 0 - 0
include/list.h → include/corosync/list.h


+ 0 - 0
include/mar_cpg.h → include/corosync/mar_cpg.h


+ 2 - 6
include/mar_gen.h → include/corosync/mar_gen.h

@@ -43,12 +43,8 @@
 #endif
 #include <string.h>
 
-#include <saAis.h>
-#ifdef COROSYNC_EXTERNAL_ENGINE
-#include <corosync/engine/swab.h>
-#else
-#include "swab.h"
-#endif
+#include <corosync/saAis.h>
+#include <corosync/swab.h>
 
 typedef int8_t mar_int8_t;
 typedef int16_t mar_int16_t;

+ 0 - 0
include/queue.h → include/corosync/queue.h


+ 0 - 0
include/rmd.h → include/corosync/rmd.h


+ 0 - 0
include/saAis.h → include/corosync/saAis.h


+ 0 - 0
include/sq.h → include/corosync/sq.h


+ 0 - 0
include/swab.h → include/corosync/swab.h


+ 0 - 0
exec/coropoll.h → include/corosync/totem/coropoll.h


+ 0 - 0
exec/totem.h → include/corosync/totem/totem.h


+ 0 - 0
exec/totemip.h → include/corosync/totem/totemip.h


+ 0 - 0
exec/totempg.h → include/corosync/totem/totempg.h


+ 0 - 1
lcr/Makefile

@@ -26,7 +26,6 @@
 #
 include ../Makefile.inc
 
-override CFLAGS += -I../include -DLCRSODIR='"$(LCRSODIR)"'
 override LDFLAGS += -L./ ${DYFLAGS}
 
 ifeq (${OPENAIS_COMPAT}, LINUX) 

+ 3 - 3
lcr/lcr_ifact.c

@@ -38,9 +38,9 @@
 #ifdef OPENAIS_SOLARIS
 #include <iso/limits_iso.h>
 #endif
-#include "lcr_comp.h"
-#include "lcr_ifact.h"
-#include "../include/hdb.h"
+#include <corosync/lcr/lcr_comp.h>
+#include <corosync/lcr/lcr_ifact.h>
+#include <corosync/hdb.h>
 #include <stdlib.h>
 
 struct lcr_component_instance {

+ 1 - 1
lcr/libtest_a.c

@@ -28,7 +28,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 #include <stdio.h>
-#include "lcr_comp.h"
+#include <corosync/lcr/lcr_comp.h>
 
 /*
  * Version 0 of the interface

+ 1 - 1
lcr/libtest_b.c

@@ -28,7 +28,7 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 #include <stdio.h>
-#include "lcr_comp.h"
+#include <corosync/lcr/lcr_comp.h>
 
 /*
  * Version 0 of the interface

+ 1 - 1
lcr/test.c

@@ -29,7 +29,7 @@
  */
 #include <assert.h>
 #include <unistd.h>
-#include "lcr_ifact.h"
+#include <corosync/lcr/lcr_ifact.h>
 
 struct iface {
 	void (*func1) (void);

+ 2 - 3
lib/Makefile

@@ -35,7 +35,6 @@ subdir ?= lib/
 
 include $(srcdir)Makefile.inc
 
-
 override LDFLAGS += -L./
 
 all: libcpg.a libcpg.so.2.0.0 \
@@ -59,7 +58,7 @@ libevs.so.2.0.0: util.o evs.o
 libcpg.so.2.0.0: util.o cpg.o
 	$(CC) $(DARWIN_OPTS) util.o cpg.o -o $@
 
-libconfdb.so.2.0.0: util.o confdb.o sa-confdb.o ../lcr/lcr_ifact.o
+libconfdb.so.2.0.0: util.o confdb.o sa-confdb.o 
 	$(CC) $(LDFLAGS) $(DARWIN_OPTS) util.o confdb.o sa-confdb.o ../lcr/lcr_ifact.o -o $@
 
 libcfg.so.2.0.0: util.o cfg.o
@@ -79,7 +78,7 @@ libevs.so.2.0.0: util.o evs.o
 libcpg.so.2.0.0: util.o cpg.o
 	$(CC) -shared -Wl,-soname,libcpg.so.2,-version-script=$(srcdir)$(subdir)libcpg.versions util.o cpg.o -o $@
 
-libconfdb.so.2.0.0: util.o confdb.o sa-confdb.o ../lcr/lcr_ifact.o
+libconfdb.so.2.0.0: util.o confdb.o sa-confdb.o 
 	$(CC) $(LDFLAGS) -shared -Wl,-soname,libconfdb.so.2,-version-script=$(srcdir)$(subdir)libconfdb.versions util.o confdb.o sa-confdb.o ../lcr/lcr_ifact.o -o $@
 
 libcfg.so.2.0.0: util.o cfg.o

+ 6 - 6
lib/cfg.c

@@ -45,12 +45,12 @@
 #include <sys/select.h>
 #include <sys/un.h>
 
-#include <saAis.h>
-#include <cfg.h>
-#include <mar_gen.h>
-#include <ipc_gen.h>
-#include <ipc_cfg.h>
-#include <ais_util.h>
+#include <corosync/saAis.h>
+#include <corosync/cfg.h>
+#include <corosync/mar_gen.h>
+#include <corosync/ipc_gen.h>
+#include <corosync/ipc_cfg.h>
+#include <corosync/ais_util.h>
 
 struct res_overlay {
 	mar_res_header_t header;

+ 6 - 6
lib/confdb.c

@@ -42,12 +42,12 @@
 #include <sys/types.h>
 #include <errno.h>
 
-#include <saAis.h>
-#include <confdb.h>
-#include <ipc_confdb.h>
-#include <mar_gen.h>
-#include <ais_util.h>
-#include <list.h>
+#include <corosync/saAis.h>
+#include <corosync/confdb.h>
+#include <corosync/ipc_confdb.h>
+#include <corosync/mar_gen.h>
+#include <corosync/ais_util.h>
+#include <corosync/list.h>
 
 #include "sa-confdb.h"
 

+ 5 - 5
lib/cpg.c

@@ -45,11 +45,11 @@
 #include <sys/socket.h>
 #include <errno.h>
 
-#include <saAis.h>
-#include <cpg.h>
-#include <ipc_cpg.h>
-#include <mar_cpg.h>
-#include <ais_util.h>
+#include <corosync/saAis.h>
+#include <corosync/cpg.h>
+#include <corosync/ipc_cpg.h>
+#include <corosync/mar_cpg.h>
+#include <corosync/ais_util.h>
 
 struct cpg_inst {
 	int response_fd;

+ 6 - 6
lib/evs.c

@@ -46,12 +46,12 @@
 #include <sys/socket.h>
 #include <errno.h>
 
-#include <swab.h>
-#include "../exec/totem.h"
-#include <saAis.h>
-#include <evs.h>
-#include <ipc_evs.h>
-#include <ais_util.h>
+#include <corosync/swab.h>
+#include <corosync/totem/totem.h>
+#include <corosync/saAis.h>
+#include <corosync/evs.h>
+#include <corosync/ipc_evs.h>
+#include <corosync/ais_util.h>
 
 struct evs_inst {
 	int response_fd;

+ 7 - 7
lib/sa-confdb.c

@@ -43,13 +43,13 @@
 #include <sys/types.h>
 #include <errno.h>
 
-#include <saAis.h>
-#include <ais_util.h>
-#include "../exec/objdb.h"
-#include "../exec/config.h"
-#include "../lcr/lcr_comp.h"
-#include "../lcr/lcr_ifact.h"
-#include "../exec/logsys.h"
+#include <corosync/saAis.h>
+#include <corosync/ais_util.h>
+#include <corosync/engine/objdb.h>
+#include <corosync/engine/config.h>
+#include <corosync/engine/logsys.h>
+#include <corosync/lcr/lcr_comp.h>
+#include <corosync/lcr/lcr_ifact.h>
 
 static struct objdb_iface_ver0 *objdb;
 

+ 3 - 3
lib/util.c

@@ -53,9 +53,9 @@
 #include <netinet/in.h>
 #include <assert.h>
 
-#include <saAis.h>
-#include <ipc_gen.h>
-#include <ais_util.h>
+#include <corosync/saAis.h>
+#include <corosync/ipc_gen.h>
+#include <corosync/ais_util.h>
 
 enum SA_HANDLE_STATE {
 	SA_HANDLE_STATE_EMPTY,

+ 5 - 5
services/Makefile

@@ -35,7 +35,7 @@ subdir ?= services/
 
 include $(srcdir)Makefile.inc
 
-LDFLAGS += -L./
+override LDFLAGS += -L./
 
 ifeq (${BUILD_DYNAMIC}, 1) 
 	override LDFLAGS += ${DYFLAGS}
@@ -60,16 +60,16 @@ all: service_evs.lcrso service_cfg.lcrso service_cpg.lcrso service_confdb.lcrso
 ifeq (${OPENAIS_COMPAT}, DARWIN)
 
 service_evs.lcrso: evs.o
-	$(CC) $(LDFLAGS) -bundle $(LDFLAGS) -bundle_loader ./aisexec -bind_at_load evs.o -o $@
+	$(CC) $(LDFLAGS) -bundle $(LDFLAGS) -bundle_loader ../exec/corosync -bind_at_load evs.o -o $@
 
 service_cfg.lcrso: cfg.o
-	$(CC) $(LDFLAGS) -bundle $(LDFLAGS) -bundle_loader ./aisexec -bind_at_load cfg.o -o $@
+	$(CC) $(LDFLAGS) -bundle $(LDFLAGS) -bundle_loader ../exec/corosync -bind_at_load cfg.o -o $@
 
 service_confdb.lcrso: confdb.o
-	$(CC) $(LDFLAGS) -bundle $(LDFLAGS) -bundle_loader ./aisexec -bind_at_load confdb.o -o $@
+	$(CC) $(LDFLAGS) -bundle $(LDFLAGS) -bundle_loader ../exec/corosync -bind_at_load confdb.o -o $@
 
 service_cpg.lcrso: cpg.o
-	$(CC) $(LDFLAGS) -bundle $(LDFLAGS) -bundle_loader ./aisexec -bind_at_load cpg.o -o $@
+	$(CC) $(LDFLAGS) -bundle $(LDFLAGS) -bundle_loader ../exec/corosync -bind_at_load cpg.o -o $@
 
 else
 

+ 10 - 10
services/cfg.c

@@ -46,16 +46,16 @@
 #include <signal.h>
 #include <string.h>
 
-#include "../include/saAis.h"
-#include "../include/cfg.h"
-#include "../include/mar_gen.h"
-#include "../include/ipc_gen.h"
-#include "../include/ipc_cfg.h"
-#include "../include/list.h"
-#include "../include/queue.h"
-#include "../lcr/lcr_comp.h"
-#include "../exec/logsys.h"
-#include "../include/coroapi.h"
+#include <corosync/saAis.h>
+#include <corosync/cfg.h>
+#include <corosync/list.h>
+#include <corosync/queue.h>
+#include <corosync/mar_gen.h>
+#include <corosync/ipc_gen.h>
+#include <corosync/ipc_cfg.h>
+#include <corosync/lcr/lcr_comp.h>
+#include <corosync/engine/logsys.h>
+#include <corosync/engine/coroapi.h>
 
 LOGSYS_DECLARE_SUBSYS ("CFG", LOG_INFO);
 

+ 10 - 7
services/confdb.c

@@ -38,13 +38,16 @@
 #include <errno.h>
 #include <unistd.h>
 
-#include "../include/saAis.h"
-#include "../include/ipc_gen.h"
-#include "../include/ipc_confdb.h"
-#include "../include/mar_gen.h"
-#include "../lcr/lcr_comp.h"
-#include "../exec/logsys.h"
-#include "../include/coroapi.h"
+#include <corosync/saAis.h>
+#include <corosync/cfg.h>
+#include <corosync/list.h>
+#include <corosync/queue.h>
+#include <corosync/mar_gen.h>
+#include <corosync/ipc_gen.h>
+#include <corosync/ipc_confdb.h>
+#include <corosync/lcr/lcr_comp.h>
+#include <corosync/engine/logsys.h>
+#include <corosync/engine/coroapi.h>
 
 LOGSYS_DECLARE_SUBSYS ("CONFDB", LOG_DEBUG);
 

+ 11 - 13
services/cpg.c

@@ -31,7 +31,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
-#ifndef COROSYNC_BSD
+#ifndef OPENAIS_BSD
 #include <alloca.h>
 #endif
 #include <sys/types.h>
@@ -51,18 +51,16 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
-#include "../exec/logsys.h"
-
-#include "../include/saAis.h"
-#include "../include/ipc_gen.h"
-#include "../include/ipc_cpg.h"
-#include "../include/mar_cpg.h"
-#include "../include/list.h"
-#include "../include/queue.h"
-#include "../lcr/lcr_comp.h"
-#include "../include/coroapi.h"
-#include "../exec/logsys.h"
-#include "../include/jhash.h"
+#include <corosync/saAis.h>
+#include <corosync/cfg.h>
+#include <corosync/list.h>
+#include <corosync/queue.h>
+#include <corosync/jhash.h>
+#include <corosync/ipc_gen.h>
+#include <corosync/ipc_cpg.h>
+#include <corosync/lcr/lcr_comp.h>
+#include <corosync/engine/logsys.h>
+#include <corosync/engine/coroapi.h>
 
 LOGSYS_DECLARE_SUBSYS ("CPG", LOG_INFO);
 

+ 8 - 8
services/evs.c

@@ -48,14 +48,14 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
-#include "swab.h"
-#include "../include/saAis.h"
-#include "../include/ipc_gen.h"
-#include "../lcr/lcr_comp.h"
-#include "../include/coroapi.h"
-#include "../include/ipc_evs.h"
-#include "../include/list.h"
-#include "../exec/logsys.h"
+#include <corosync/swab.h>
+#include <corosync/saAis.h>
+#include <corosync/ipc_gen.h>
+#include <corosync/lcr/lcr_comp.h>
+#include <corosync/engine/coroapi.h>
+#include <corosync/ipc_evs.h>
+#include <corosync/list.h>
+#include <corosync/engine/logsys.h>
 
 LOGSYS_DECLARE_SUBSYS ("EVS", LOG_INFO);
 

+ 1 - 1
test/Makefile

@@ -41,7 +41,7 @@ LIBRARIES= ../lib/libevs.a ../lib/libcpg.a ../lib/libcfg.a ../lib/libconfdb.a
 LIBS = $(LIBRARIES) 
 BINARIES= testevs evsbench testcpg testcpg2 cpgbench testconfdb
 
-override CFLAGS += -I../include
+#override CFLAGS += -I../include
 override LDFLAGS += -L../lib
 
 EXTRA_CFLAGS = -I$(srcdir)include

+ 2 - 2
test/cpgbench.c

@@ -50,8 +50,8 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
-#include "saAis.h"
-#include "cpg.h"
+#include <corosync/saAis.h>
+#include <corosync/cpg.h>
 
 #ifdef OPENAIS_SOLARIS
 #define timersub(a, b, result)						\

+ 2 - 2
test/evsbench.c

@@ -49,8 +49,8 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
-#include "saAis.h"
-#include "evs.h"
+#include <corosync/saAis.h>
+#include <corosync/evs.h>
 
 #ifdef OPENAIS_SOLARIS
 #define timersub(a, b, result)						\

+ 2 - 2
test/testconfdb.c

@@ -41,8 +41,8 @@
 #include <sys/types.h>
 #include <sys/un.h>
 
-#include "saAis.h"
-#include "confdb.h"
+#include <corosync/saAis.h>
+#include <corosync/confdb.h>
 
 
 /* Callbacks are not supported yet */

+ 2 - 2
test/testcpg.c

@@ -45,8 +45,8 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
-#include "saAis.h"
-#include "cpg.h"
+#include <corosync/saAis.h>
+#include <corosync/cpg.h>
 
 static int quit = 0;
 static int show_ip = 0;

+ 2 - 1
test/testcpg2.c

@@ -36,7 +36,8 @@
 #include <poll.h>
 #include <sys/types.h>
 #include <sys/socket.h>
-#include "../include/cpg.h"
+
+#include <corosync/cpg.h>
 
 void deliver(
 	cpg_handle_t handle,

+ 1 - 1
test/testevs.c

@@ -38,7 +38,7 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <errno.h>
-#include "../include/evs.h"
+#include <corosync/evs.h>
 
 char *delivery_string;
 

+ 2 - 2
tools/Makefile

@@ -42,7 +42,7 @@ ifeq (${OPENAIS_COMPAT}, SOLARIS)
 endif
 
 LIBS = ../lib/libconfdb.a ../lib/libcfg.a
-BINARIES=corosync-objctl corosync-cfgtool keygen
+BINARIES=corosync-objctl corosync-cfgtool corosync-keygen
 APPS_SRC=$(addsuffix .c,$(BINARIES))
 EXTRA_CFLAGS = -I$(srcdir)include
 
@@ -54,7 +54,7 @@ corosync-objctl: corosync-objctl.o $(LIBS)
 corosync-cfgtool: corosync-cfgtool.o $(LIBS)
 	$(CC) $(LDFLAGS) -o $@ $< $(LIBS)
 
-keygen: keygen.o
+corosync-keygen: corosync-keygen.o
 	$(CC) $(LDFLAGS) -o $@ $<
 
 clean:

+ 2 - 2
tools/corosync-cfgtool.c

@@ -45,8 +45,8 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 
-#include "saAis.h"
-#include "cfg.h"
+#include <corosync/saAis.h>
+#include <corosync/cfg.h>
 
 static void ringstatusget_do (void)
 {

+ 0 - 0
tools/keygen.c → tools/corosync-keygen.c


+ 3 - 2
tools/corosync-objctl.c

@@ -40,8 +40,9 @@
 #include <string.h>
 #include <sys/types.h>
 #include <sys/un.h>
-#include "saAis.h"
-#include "confdb.h"
+
+#include <corosync/saAis.h>
+#include <corosync/confdb.h>
 
 #define SEPERATOR '.'
 #define SEPERATOR_STR "."