]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
libcgroup: ABI guarantee
authorDhaval Giani <dhaval@linux.vnet.ibm.com>
Tue, 30 Sep 2008 15:59:18 +0000 (15:59 +0000)
committerDhaval Giani <dhaval@linux.vnet.ibm.com>
Tue, 30 Sep 2008 15:59:18 +0000 (15:59 +0000)
From: Balbir Singh <balbir@linux.vnet.ibm.com>

Versioning all the symbols, in order to provide ABI guarantee.

Bringing Balbir's patch up to date, and changing the version to 0.32.

Please review.

[dhaval@linux.vnet.ibm.com: updated with latest symbols]
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
git-svn-id: https://libcg.svn.sourceforge.net/svnroot/libcg/trunk@203 4f4bb910-9a46-0410-90c8-c897d4f1cd53

Makefile
Makefile.in
libcgroup.map [new file with mode: 0644]

index c92d48f437b12796d70746d40d9cc5cc1da80057..152404931ca5e4c2dd2480e0c99d89a367580e93 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -21,7 +21,7 @@ bindir=${exec_prefix}/bin
 sbindir=${exec_prefix}/sbin
 libdir=${exec_prefix}/lib
 includedir=${prefix}/include
-prefix=/usr
+prefix=/usr/local
 exec_prefix=${prefix}
 INSTALL=install
 INSTALL_DATA=install -m 644
@@ -32,7 +32,7 @@ VERSION=1
 all: libcgroup.so cgconfigparser cgexec cgclassify cgrulesengd
 
 cgconfigparser: libcgroup.so cgconfig.c libcgroup.h
-       $(CC) $(CFLAGS) -Wall -o $@ cgconfig.c $(LDFLAGS) $(LIBS)
+       $(CC) $(CFLAGS) $(INC) -Wall -o $@ cgconfig.c $(LDFLAGS) $(LIBS)
 
 cgexec: libcgroup.so cgexec.c libcgroup.h
        $(CC) $(CFLAGS) -Wall -o $@ cgexec.c $(LDFLAGS) $(LIBS)
@@ -51,8 +51,9 @@ lex.yy.c: lex.l
        $(LEX) lex.l
 
 libcgroup.so: api.c libcgroup.h wrapper.c config.c lex.yy.c y.tab.c
-       $(CC) $(CFLAGS) -shared -fPIC -Wl,--soname,$@.$(VERSION) -o $@ api.c \
-       wrapper.c lex.yy.c y.tab.c config.c
+       $(CC) $(CFLAGS) -shared -fPIC -Wl,--soname,$@.$(VERSION) -o $@ \
+       -Wl,--version-script,libcgroup.map,--allow-shlib-undefined \
+       api.c wrapper.c lex.yy.c y.tab.c config.c
        ln -sf $@ $@.$(VERSION)
 
 test:
index 74601cce7c9a8154be282973b4d11a5c930f9318..c24420f4fe1bdd0a43580c3d782ca485a18a146b 100644 (file)
@@ -32,7 +32,7 @@ VERSION=1
 all: libcgroup.so cgconfigparser cgexec cgclassify cgrulesengd
 
 cgconfigparser: libcgroup.so cgconfig.c libcgroup.h
-       $(CC) $(CFLAGS) -Wall -o $@ cgconfig.c $(LDFLAGS) $(LIBS)
+       $(CC) $(CFLAGS) $(INC) -Wall -o $@ cgconfig.c $(LDFLAGS) $(LIBS)
 
 cgexec: libcgroup.so cgexec.c libcgroup.h
        $(CC) $(CFLAGS) -Wall -o $@ cgexec.c $(LDFLAGS) $(LIBS)
@@ -51,8 +51,9 @@ lex.yy.c: lex.l
        $(LEX) lex.l
 
 libcgroup.so: api.c libcgroup.h wrapper.c config.c lex.yy.c y.tab.c
-       $(CC) $(CFLAGS) -shared -fPIC -Wl,--soname,$@.$(VERSION) -o $@ api.c \
-       wrapper.c lex.yy.c y.tab.c config.c
+       $(CC) $(CFLAGS) -shared -fPIC -Wl,--soname,$@.$(VERSION) -o $@ \
+       -Wl,--version-script,libcgroup.map,--allow-shlib-undefined \
+       api.c wrapper.c lex.yy.c y.tab.c config.c
        ln -sf $@ $@.$(VERSION)
 
 test:
diff --git a/libcgroup.map b/libcgroup.map
new file mode 100644 (file)
index 0000000..61ae3ba
--- /dev/null
@@ -0,0 +1,42 @@
+CGROUP_0.32 {
+global:
+       cgroup_init;
+       cgroup_attach_task;
+       cgroup_modify_cgroup;
+       cgroup_create_cgroup;
+       cgroup_delete_cgroup;
+       cgroup_attach_task_pid;
+       cgroup_get_cgroup;
+       cgroup_create_cgroup_from_parent;
+       cgroup_copy_cgroup;
+       cgroup_change_cgroup_uid_gid;
+       cgroup_change_cgroup_path;
+       cgroup_new_cgroup;
+       cgroup_add_controller;
+       cgroup_free;
+       cgroup_free_controllers;
+       cgroup_add_value_string;
+       cgroup_add_value_int64;
+       cgroup_add_value_uint64;
+       cgroup_add_value_bool;
+       cgroup_compare_cgroup;
+       cgroup_compare_controllers;
+       cgroup_set_uid_gid;
+       cgroup_get_uid_gid;
+       cgroup_get_value_string;
+       cgroup_set_value_string;
+       cgroup_get_value_int64;
+       cgroup_set_value_int64;
+       cgroup_get_value_uint64;
+       cgroup_set_value_uint64;
+       cgroup_get_value_bool;
+       cgroup_set_value_bool;
+       cgroup_change_cgroup_uid_gid_flags;
+       cgroup_print_rules_config;
+       cgroup_reload_cached_rules;
+       cgroup_init_rules_cache;
+       cgroup_get_current_controller_path;
+       cgroup_config_load_config;
+local:
+       *;
+};