Commit ca663758 authored by Matthieu Dorier's avatar Matthieu Dorier

Merge branch 'master' of xgitlab.cels.anl.gov:sds/mobject-store

Conflicts:
	Makefile.am
parents 92ce2fb3 2fc1c4b4
AUTOMAKE_OPTIONS = foreign
ACLOCAL_AMFLAGS="-Im4"
check_PROGRAMS =
TESTS =
EXTRA_DIST = prepare.sh
AM_CPPFLAGS = -I$(top_srcdir)/include
......@@ -22,3 +24,5 @@ libmobject_la_CPPFLAGS = -I${srcdir}/include -I${srcdir}/src
include Make.rules
include $(top_srcdir)/src/Makefile.subdir
include $(top_srcdir)/tests/Makefile.subdir
......@@ -3,8 +3,8 @@ AC_INIT([mobject], [0.1], [ssio-services@lists.mcs.anl.gov])
AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects silent-rules])
AM_SILENT_RULES([yes])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([include/mobject-store.h])
AC_CONFIG_HEADER([include/mobject-conf.h])
AC_CONFIG_SRCDIR([include/libmobject-store.h])
AC_CONFIG_HEADER([src/mobject-store-config.h])
LT_PREREQ([2.2])
AM_PROG_AR
LT_INIT([dlopen])
......
......@@ -11,6 +11,9 @@
extern "C" {
#endif
#include <inttypes.h>
#include <time.h>
// derived from: http://docs.ceph.com/docs/master/mobject_store/api/libmobject_store/
......
......@@ -24,7 +24,7 @@ typedef mobject_store_t rados_t;
#define LIBRADOS_OPERATION_FULL_FORCE LIBMOBJECT_OPERATION_FULL_FORCE
#define LIBRADOS_OPERATION_IGNORE_REDIRECT LIBMOBJECT_OPERATION_IGNORE_REDIRECT
typedef mobject_store_ioctx rados_ioctx_t;
typedef mobject_store_ioctx_t rados_ioctx_t;
typedef mobject_store_omap_iter_t rados_omap_iter_t;
typedef mobject_store_write_op_t rados_write_op_t;
typedef mobject_store_read_op_t rados_read_op_t;
......
src_libmobject_store_la_SOURCES += \
src/libmobject-store.c \
include/libmobject-store.h
......@@ -4,7 +4,7 @@
* See COPYRIGHT in top-level directory.
*/
#include "mobject-conf.h"
#include "mobject-store-config.h"
#include <stdio.h>
#include <assert.h>
......@@ -12,14 +12,14 @@
#include <margo.h>
#include <ssg.h>
#include "mobject-store.h"
#include "libmobject-store.h"
struct mobject_store_handle
{
int test;
};
int rados_create(rados_t *cluster, const char * const id)
int mobject_store_create(mobject_store_t *cluster, const char * const id)
{
struct mobject_store_handle *cluster_handle;
(void)id; /* XXX: id unused in mobject */
......@@ -45,7 +45,7 @@ int mobject_store_connect(mobject_store_t cluster)
}
#endif
void rados_shutdown(rados_t cluster)
void mobject_store_shutdown(mobject_store_t cluster)
{
struct mobject_store_handle *cluster_handle =
(struct mobject_store_handle *)cluster;
......
check_PROGRAMS += \
tests/mobject-connect-test
TESTS += \
tests/connect-test.sh
tests_mobject_connect_test_SOURCES = \
tests/mobject-connect-test.c
tests_mobject_connect_test_LDADD = \
src/libmobject-store.la
/*
* (C) 2017 The University of Chicago
*
* See COPYRIGHT in top-level directory.
*/
#include "mobject-store-config.h"
#include <stdio.h>
#include <assert.h>
#ifdef USE_LIBRADOS
#include <librados.h>
#else
#include <libmobject-store.h>
#include <librados-mobject-store.h>
#endif
int main(int argc, char *argv[])
{
rados_t cluster;
int ret;
ret = rados_create(&cluster, "admin");
assert(ret == 0);
rados_shutdown(cluster);
return(0);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment