From bc8c603db6594b75589a10b7fdda37a2376c3d5e Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Thu, 4 Oct 2012 04:59:23 +0000 Subject: [PATCH] Add compatibility framework for API level 71 and newer. --- atheme-compat.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 atheme-compat.h diff --git a/atheme-compat.h b/atheme-compat.h new file mode 100644 index 0000000..dd5b386 --- /dev/null +++ b/atheme-compat.h @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2012 William Pitcock . + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include "atheme.h" + +#ifndef __ATHEME_CONTRIB_COMPAT_H__ +#define __ATHEME_CONTRIB_COMPAT_H__ + +/* + * This header provides a compatibility layer, allowing previous versions + * of Atheme to compile a subset of the Atheme 7.1 API, if such API features + * are unavailable. + */ +#ifdef CURRENT_ABI_REVISION < 710000 +typedef char *stringref; +#endif + +#endif