@@ -1,6 +1,7 @@
/* lt__dirent.h -- internal directory entry scanning interface
Copyright (C) 2001, 2004, 2006 Free Software Foundation, Inc.
Copyright (C) 2001, 2004, 2006, 2011-2015 Free Software Foundation,
Inc.
Written by Bob Friesenhahn, 2001
NOTE: The canonical source of this file is maintained with the
@@ -28,10 +29,10 @@ or obtained by writing to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#if !defined(LT__DIRENT_H)
#if !defined LT__DIRENT_H
#define LT__DIRENT_H 1

#if defined(LT_CONFIG_H)
#if defined LT_CONFIG_H
# include LT_CONFIG_H
#else
# include <config.h>
@@ -80,8 +81,8 @@ LT_SCOPE void closedir (DIR *entry);

LT_END_C_DECLS

#else /* !defined(__WINDOWS__)*/
#else /* !defined __WINDOWS__*/
ERROR - cannot find dirent
#endif /*!defined(__WINDOWS__)*/
#endif /*!defined __WINDOWS__*/

#endif /*!defined(LT__DIRENT_H)*/
#endif /*!defined LT__DIRENT_H*/
@@ -1,6 +1,7 @@
/* lt__glibc.h -- support for non glibc environments
Copyright (C) 2004, 2006, 2007 Free Software Foundation, Inc.
Copyright (C) 2004, 2006-2007, 2011-2015 Free Software Foundation,
Inc.
Written by Gary V. Vaughan, 2004
NOTE: The canonical source of this file is maintained with the
@@ -28,16 +29,16 @@ or obtained by writing to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#if !defined(LT__GLIBC_H)
#if !defined LT__GLIBC_H
#define LT__GLIBC_H 1

#if defined(LT_CONFIG_H)
#if defined LT_CONFIG_H
# include LT_CONFIG_H
#else
# include <config.h>
#endif

#if !defined(HAVE_ARGZ_H) || !defined(HAVE_WORKING_ARGZ)
#if !defined HAVE_ARGZ_H || !defined HAVE_WORKING_ARGZ
/* Redefine any glibc symbols we reimplement to import the
implementations into our lt__ namespace so we don't ever
clash with the system library if our clients use argz_*
@@ -52,7 +53,10 @@ or obtained by writing to the Free Software Foundation, Inc.,
# define argz_next lt__argz_next
# undef argz_stringify
# define argz_stringify lt__argz_stringify
#endif

# include <lt__argz.h>

#else

#ifdef __cplusplus
extern "C" {
@@ -64,6 +68,8 @@ extern "C" {
}
#endif

#endif /*!defined HAVE_ARGZ_H || !defined HAVE_WORKING_ARGZ*/

# define slist_concat lt__slist_concat
# define slist_cons lt__slist_cons
# define slist_delete lt__slist_delete
@@ -80,4 +86,4 @@ extern "C" {

#include <slist.h>

#endif /*!defined(LT__GLIBC_H)*/
#endif /*!defined LT__GLIBC_H*/
@@ -1,6 +1,6 @@
/* lt__private.h -- internal apis for libltdl
Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
Copyright (C) 2004-2008, 2011-2015 Free Software Foundation, Inc.
Written by Gary V. Vaughan, 2004
NOTE: The canonical source of this file is maintained with the
@@ -28,10 +28,10 @@ or obtained by writing to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#if !defined(LT__PRIVATE_H)
#if !defined LT__PRIVATE_H
#define LT__PRIVATE_H 1

#if defined(LT_CONFIG_H)
#if defined LT_CONFIG_H
# include LT_CONFIG_H
#else
# include <config.h>
@@ -43,7 +43,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
#include <errno.h>
#include <string.h>

#if defined(HAVE_UNISTD_H)
#if defined HAVE_UNISTD_H
# include <unistd.h>
#endif

@@ -56,15 +56,15 @@ or obtained by writing to the Free Software Foundation, Inc.,
/* ...and all exported interfaces. */
#include "ltdl.h"

#if defined(WITH_DMALLOC)
#if defined WITH_DMALLOC
# include <dmalloc.h>
#endif

/* DLL building support on win32 hosts; mostly to workaround their
ridiculous implementation of data symbol exporting. */
#ifndef LT_GLOBAL_DATA
# if defined(__WINDOWS__) || defined(__CYGWIN__)
# if defined(DLL_EXPORT) /* defined by libtool (if required) */
# if defined __WINDOWS__ || defined __CYGWIN__
# if defined DLL_EXPORT /* defined by libtool (if required) */
# define LT_GLOBAL_DATA __declspec(dllexport)
# endif
# endif
@@ -86,16 +86,16 @@ or obtained by writing to the Free Software Foundation, Inc.,

LT_BEGIN_C_DECLS

#if !defined(errno)
#if !defined errno
extern int errno;
#endif

LT_SCOPE void lt__alloc_die_callback (void);


/* For readability: */
#define strneq(s1, s2) (strcmp((s1), (s2)) != 0)
#define streq(s1, s2) (!strcmp((s1), (s2)))
#define STRNEQ(s1, s2) (strcmp((s1), (s2)) != 0)
#define STREQ(s1, s2) (strcmp((s1), (s2)) == 0)



@@ -146,4 +146,4 @@ LT_SCOPE const char *lt__set_last_error (const char *errormsg);

LT_END_C_DECLS

#endif /*!defined(LT__PRIVATE_H)*/
#endif /*!defined LT__PRIVATE_H*/
@@ -1,6 +1,6 @@
/* lt__strl.h -- size-bounded string copying and concatenation
Copyright (C) 2004, 2006 Free Software Foundation, Inc.
Copyright (C) 2004, 2006, 2011-2015 Free Software Foundation, Inc.
Written by Bob Friesenhahn, 2004
NOTE: The canonical source of this file is maintained with the
@@ -28,10 +28,10 @@ or obtained by writing to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

#if !defined(LT__STRL_H)
#if !defined LT__STRL_H
#define LT__STRL_H 1

#if defined(LT_CONFIG_H)
#if defined LT_CONFIG_H
# include LT_CONFIG_H
#else
# include <config.h>
@@ -40,14 +40,14 @@ or obtained by writing to the Free Software Foundation, Inc.,
#include <string.h>
#include "lt_system.h"

#if !defined(HAVE_STRLCAT)
#if !defined HAVE_STRLCAT
# define strlcat(dst,src,dstsize) lt_strlcat(dst,src,dstsize)
LT_SCOPE size_t lt_strlcat(char *dst, const char *src, const size_t dstsize);
#endif /* !defined(HAVE_STRLCAT) */
#endif /* !defined HAVE_STRLCAT */

#if !defined(HAVE_STRLCPY)
#if !defined HAVE_STRLCPY
# define strlcpy(dst,src,dstsize) lt_strlcpy(dst,src,dstsize)
LT_SCOPE size_t lt_strlcpy(char *dst, const char *src, const size_t dstsize);
#endif /* !defined(HAVE_STRLCPY) */
#endif /* !defined HAVE_STRLCPY */

#endif /*!defined(LT__STRL_H)*/
#endif /*!defined LT__STRL_H*/
@@ -1,6 +1,7 @@
/* lt_dlloader.h -- dynamic library loader interface
Copyright (C) 2004, 2007, 2008 Free Software Foundation, Inc.
Copyright (C) 2004, 2007-2008, 2011-2015 Free Software Foundation,
Inc.
Written by Gary V. Vaughan, 2004
NOTE: The canonical source of this file is maintained with the
@@ -28,7 +29,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

#if !defined(LT_DLLOADER_H)
#if !defined LT_DLLOADER_H
#define LT_DLLOADER_H 1

#include <libltdl/lt_system.h>
@@ -87,4 +88,4 @@ LT_SCOPE void lt_dlloader_dump (void);

LT_END_C_DECLS

#endif /*!defined(LT_DLLOADER_H)*/
#endif /*!defined LT_DLLOADER_H*/
@@ -1,6 +1,7 @@
/* lt_error.h -- error propogation interface
/* lt_error.h -- error propagation interface
Copyright (C) 1999, 2000, 2001, 2004, 2007 Free Software Foundation, Inc.
Copyright (C) 1999-2001, 2004, 2007, 2011-2015 Free Software
Foundation, Inc.
Written by Thomas Tanner, 1999
NOTE: The canonical source of this file is maintained with the
@@ -29,7 +30,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
*/

/* Only include this header file once. */
#if !defined(LT_ERROR_H)
#if !defined LT_ERROR_H
#define LT_ERROR_H 1

#include <libltdl/lt_system.h>
@@ -82,4 +83,4 @@ LT_SCOPE int lt_dlseterror (int errorcode);

LT_END_C_DECLS

#endif /*!defined(LT_ERROR_H)*/
#endif /*!defined LT_ERROR_H*/
@@ -1,6 +1,6 @@
/* lt_system.h -- system portability abstraction layer
Copyright (C) 2004, 2007, 2010 Free Software Foundation, Inc.
Copyright (C) 2004, 2007, 2010-2015 Free Software Foundation, Inc.
Written by Gary V. Vaughan, 2004
NOTE: The canonical source of this file is maintained with the
@@ -28,18 +28,18 @@ or obtained by writing to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

#if !defined(LT_SYSTEM_H)
#if !defined LT_SYSTEM_H
#define LT_SYSTEM_H 1

#include <stddef.h>
#include <stdlib.h>
#include <sys/types.h>

/* Some systems do not define EXIT_*, even with STDC_HEADERS. */
#if !defined(EXIT_SUCCESS)
#if !defined EXIT_SUCCESS
# define EXIT_SUCCESS 0
#endif
#if !defined(EXIT_FAILURE)
#if !defined EXIT_FAILURE
# define EXIT_FAILURE 1
#endif

@@ -53,21 +53,21 @@ or obtained by writing to the Free Software Foundation, Inc.,
/* LTDL_BEGIN_C_DECLS should be used at the beginning of your declarations,
so that C++ compilers don't mangle their names. Use LTDL_END_C_DECLS at
the end of C declarations. */
#if defined(__cplusplus)
#if defined __cplusplus
# define LT_BEGIN_C_DECLS extern "C" {
# define LT_END_C_DECLS }
#else
# define LT_BEGIN_C_DECLS /* empty */
# define LT_END_C_DECLS /* empty */
#endif

/* LT_STMT_START/END are used to create macros which expand to a
/* LT_STMT_START/END are used to create macros that expand to a
a single compound statement in a portable way. */
#if defined (__GNUC__) && !defined (__STRICT_ANSI__) && !defined (__cplusplus)
#if defined __GNUC__ && !defined __STRICT_ANSI__ && !defined __cplusplus
# define LT_STMT_START (void)(
# define LT_STMT_END )
#else
# if (defined (sun) || defined (__sun__))
# if (defined sun || defined __sun__)
# define LT_STMT_START if (1)
# define LT_STMT_END else (void)0
# else
@@ -77,11 +77,11 @@ or obtained by writing to the Free Software Foundation, Inc.,
#endif

/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
/* DATA imports from DLLs on WIN32 con't be const, because runtime
#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
/* DATA imports from DLLs on WIN32 can't be const, because runtime
relocations are performed -- see ld's documentation on pseudo-relocs. */
# define LT_DLSYM_CONST
#elif defined(__osf__)
#elif defined __osf__
/* This system does not cope well with relocations in const data. */
# define LT_DLSYM_CONST
#else
@@ -91,41 +91,41 @@ or obtained by writing to the Free Software Foundation, Inc.,
/* Canonicalise Windows and Cygwin recognition macros.
To match the values set by recent Cygwin compilers, make sure that if
__CYGWIN__ is defined (after canonicalisation), __WINDOWS__ is NOT! */
#if defined(__CYGWIN32__) && !defined(__CYGWIN__)
#if defined __CYGWIN32__ && !defined __CYGWIN__
# define __CYGWIN__ __CYGWIN32__
#endif
#if defined(__CYGWIN__)
# if defined(__WINDOWS__)
#if defined __CYGWIN__
# if defined __WINDOWS__
# undef __WINDOWS__
# endif
#elif defined(_WIN32)
#elif defined _WIN32
# define __WINDOWS__ _WIN32
#elif defined(WIN32)
#elif defined WIN32
# define __WINDOWS__ WIN32
#endif
#if defined(__CYGWIN__) && defined(__WINDOWS__)
#if defined __CYGWIN__ && defined __WINDOWS__
# undef __WINDOWS__
#endif


/* DLL building support on win32 hosts; mostly to workaround their
ridiculous implementation of data symbol exporting. */
#if !defined(LT_SCOPE)
# if defined(__WINDOWS__) || defined(__CYGWIN__)
# if defined(DLL_EXPORT) /* defined by libtool (if required) */
#if !defined LT_SCOPE
# if defined __WINDOWS__ || defined __CYGWIN__
# if defined DLL_EXPORT /* defined by libtool (if required) */
# define LT_SCOPE extern __declspec(dllexport)
# endif
# if defined(LIBLTDL_DLL_IMPORT) /* define if linking with this dll */
# if defined LIBLTDL_DLL_IMPORT /* define if linking with this dll */
/* note: cygwin/mingw compilers can rely instead on auto-import */
# define LT_SCOPE extern __declspec(dllimport)
# endif
# endif
# if !defined(LT_SCOPE) /* static linking or !__WINDOWS__ */
# if !defined LT_SCOPE /* static linking or !__WINDOWS__ */
# define LT_SCOPE extern
# endif
#endif

#if defined(__WINDOWS__)
#if defined __WINDOWS__
/* LT_DIRSEP_CHAR is accepted *in addition* to '/' as a directory
separator when it is set. */
# define LT_DIRSEP_CHAR '\\'
@@ -134,13 +134,13 @@ or obtained by writing to the Free Software Foundation, Inc.,
# define LT_PATHSEP_CHAR ':'
#endif

#if defined(_MSC_VER) /* Visual Studio */
#if defined _MSC_VER /* Visual Studio */
# define R_OK 4
#endif

/* fopen() mode flags for reading a text file */
#undef LT_READTEXT_MODE
#if defined(__WINDOWS__) || defined(__CYGWIN__)
#if defined __WINDOWS__ || defined __CYGWIN__
# define LT_READTEXT_MODE "rt"
#else
# define LT_READTEXT_MODE "r"
@@ -163,4 +163,4 @@ or obtained by writing to the Free Software Foundation, Inc.,
# define LT_CONC3(a, b, c) LT__CONC3(a, b, c)
#endif

#endif /*!defined(LT_SYSTEM_H)*/
#endif /*!defined LT_SYSTEM_H*/
@@ -1,6 +1,7 @@
/* slist.h -- generalised singly linked lists
Copyright (C) 2000, 2004, 2009 Free Software Foundation, Inc.
Copyright (C) 2000, 2004, 2009, 2011-2015 Free Software Foundation,
Inc.
Written by Gary V. Vaughan, 2000
NOTE: The canonical source of this file is maintained with the
@@ -30,18 +31,18 @@ or obtained by writing to the Free Software Foundation, Inc.,

/* A generalised list. This is deliberately transparent so that you
can make the NEXT field of all your chained data structures first,
and then cast them to `(SList *)' so that they can be manipulated
and then cast them to '(SList *)' so that they can be manipulated
by this API.
Alternatively, you can generate raw SList elements using slist_new(),
and put the element data in the USERDATA field. Either way you
get to manage the memory involved by yourself.
*/

#if !defined(SLIST_H)
#if !defined SLIST_H
#define SLIST_H 1

#if defined(LTDL)
#if defined LTDL
# include <libltdl/lt__glibc.h>
# include <libltdl/lt_system.h>
#else
@@ -50,13 +51,13 @@ or obtained by writing to the Free Software Foundation, Inc.,

#include <stddef.h>

#if defined(__cplusplus)
#if defined __cplusplus
extern "C" {
#endif

typedef struct slist {
struct slist *next; /* chain forward pointer*/
const void *userdata; /* for boxed `SList' item */
const void *userdata; /* for boxed 'SList' item */
} SList;

typedef void * SListCallback (SList *item, void *userdata);
@@ -85,12 +86,12 @@ LT_SCOPE void * slist_foreach (SList *slist, SListCallback *foreach,
LT_SCOPE SList *slist_box (const void *userdata);
LT_SCOPE void * slist_unbox (SList *item);

#if defined(__cplusplus)
#if defined __cplusplus
}
#endif

#if !defined(LTDL)
#if !defined LTDL
# undef LT_SCOPE
#endif

#endif /*!defined(SLIST_H)*/
#endif /*!defined SLIST_H*/
@@ -1,7 +1,7 @@
/* loader-dld_link.c -- dynamic linking with dld
Copyright (C) 1998, 1999, 2000, 2004, 2006,
2007, 2008 Free Software Foundation, Inc.
Copyright (C) 1998-2000, 2004, 2006-2008, 2011-2015 Free Software
Foundation, Inc.
Written by Thomas Tanner, 1998
NOTE: The canonical source of this file is maintained with the
@@ -90,14 +90,14 @@ get_vtable (lt_user_data loader_data)
/* --- IMPLEMENTATION --- */


#if defined(HAVE_DLD_H)
#if defined HAVE_DLD_H
# include <dld.h>
#endif

/* A function called through the vtable when this loader is no
longer needed by the application. */
static int
vl_exit (lt_user_data LT__UNUSED loader_data)
vl_exit (lt_user_data loader_data LT__UNUSED)
{
vtable = NULL;
return 0;
@@ -107,8 +107,8 @@ vl_exit (lt_user_data LT__UNUSED loader_data)
loader. Returns an opaque representation of the newly opened
module for processing with this loader's other vtable functions. */
static lt_module
vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
lt_dladvise LT__UNUSED advise)
vm_open (lt_user_data loader_data LT__UNUSED, const char *filename,
lt_dladvise advise LT__UNUSED)
{
lt_module module = lt__strdup (filename);

@@ -124,7 +124,7 @@ vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
/* A function called through the vtable when a particular module
should be unloaded. */
static int
vm_close (lt_user_data LT__UNUSED loader_data, lt_module module)
vm_close (lt_user_data loader_data LT__UNUSED, lt_module module)
{
int errors = 0;

@@ -144,7 +144,7 @@ vm_close (lt_user_data LT__UNUSED loader_data, lt_module module)
/* A function called through the vtable to get the address of
a symbol loaded from a particular module. */
static void *
vm_sym (lt_user_data LT__UNUSED loader_data, lt_module LT__UNUSED module,
vm_sym (lt_user_data loader_data LT__UNUSED, lt_module module LT__UNUSED,
const char *name)
{
void *address = dld_get_func (name);
@@ -1,7 +1,7 @@
/* loader-dlopen.c -- dynamic linking with dlopen/dlsym
Copyright (C) 1998, 1999, 2000, 2004, 2006,
2007, 2008 Free Software Foundation, Inc.
Copyright (C) 1998-2000, 2004, 2006-2008, 2011-2015 Free Software
Foundation, Inc.
Written by Thomas Tanner, 1998
NOTE: The canonical source of this file is maintained with the
@@ -68,7 +68,7 @@ get_vtable (lt_user_data loader_data)
if (vtable && !vtable->name)
{
vtable->name = "lt_dlopen";
#if defined(DLSYM_USCORE)
#if defined DLSYM_USCORE
vtable->sym_prefix = "_";
#endif
vtable->module_open = vm_open;
@@ -93,53 +93,53 @@ get_vtable (lt_user_data loader_data)
/* --- IMPLEMENTATION --- */


#if defined(HAVE_DLFCN_H)
#if defined HAVE_DLFCN_H
# include <dlfcn.h>
#endif

#if defined(HAVE_SYS_DL_H)
#if defined HAVE_SYS_DL_H
# include <sys/dl.h>
#endif


/* We may have to define LT_LAZY_OR_NOW in the command line if we
find out it does not work in some platform. */
#if !defined(LT_LAZY_OR_NOW)
# if defined(RTLD_LAZY)
#if !defined LT_LAZY_OR_NOW
# if defined RTLD_LAZY
# define LT_LAZY_OR_NOW RTLD_LAZY
# else
# if defined(DL_LAZY)
# if defined DL_LAZY
# define LT_LAZY_OR_NOW DL_LAZY
# endif
# endif /* !RTLD_LAZY */
#endif
#if !defined(LT_LAZY_OR_NOW)
# if defined(RTLD_NOW)
#if !defined LT_LAZY_OR_NOW
# if defined RTLD_NOW
# define LT_LAZY_OR_NOW RTLD_NOW
# else
# if defined(DL_NOW)
# if defined DL_NOW
# define LT_LAZY_OR_NOW DL_NOW
# endif
# endif /* !RTLD_NOW */
#endif
#if !defined(LT_LAZY_OR_NOW)
#if !defined LT_LAZY_OR_NOW
# define LT_LAZY_OR_NOW 0
#endif /* !LT_LAZY_OR_NOW */

/* We only support local and global symbols from modules for loaders
that provide such a thing, otherwise the system default is used. */
#if !defined(RTLD_GLOBAL)
# if defined(DL_GLOBAL)
#if !defined RTLD_GLOBAL
# if defined DL_GLOBAL
# define RTLD_GLOBAL DL_GLOBAL
# endif
#endif /* !RTLD_GLOBAL */
#if !defined(RTLD_LOCAL)
# if defined(DL_LOCAL)
#if !defined RTLD_LOCAL
# if defined DL_LOCAL
# define RTLD_LOCAL DL_LOCAL
# endif
#endif /* !RTLD_LOCAL */

#if defined(HAVE_DLERROR)
#if defined HAVE_DLERROR
# define DLERROR(arg) dlerror ()
#else
# define DLERROR(arg) LT__STRERROR (arg)
@@ -152,7 +152,7 @@ get_vtable (lt_user_data loader_data)
/* A function called through the vtable when this loader is no
longer needed by the application. */
static int
vl_exit (lt_user_data LT__UNUSED loader_data)
vl_exit (lt_user_data loader_data LT__UNUSED)
{
vtable = NULL;
return 0;
@@ -163,11 +163,14 @@ vl_exit (lt_user_data LT__UNUSED loader_data)
loader. Returns an opaque representation of the newly opened
module for processing with this loader's other vtable functions. */
static lt_module
vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
vm_open (lt_user_data loader_data LT__UNUSED, const char *filename,
lt_dladvise advise)
{
int module_flags = LT_LAZY_OR_NOW;
lt_module module;
#ifdef RTLD_MEMBER
int len = LT_STRLEN (filename);
#endif

if (advise)
{
@@ -191,8 +194,45 @@ vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
#endif
}

#ifdef RTLD_MEMBER /* AIX */
if (len >= 4) /* at least "l(m)" */
{
/* Advise loading an archive member only if the filename really
contains both the opening and closing parent, and a member. */
if (filename[len-1] == ')')
{
const char *opening = strrchr(filename, '(');
if (opening && opening < (filename+len-2) && strchr(opening+1, '/') == NULL)
module_flags |= RTLD_MEMBER;
}
}
#endif

module = dlopen (filename, module_flags);

#if defined RTLD_MEMBER && defined LT_SHARED_LIB_MEMBER
if (!module && len && !(module_flags & RTLD_MEMBER) && errno == ENOEXEC)
{
/* Loading without a member specified failed with "Exec format error".
So the file is there, but either has wrong bitwidth, or is an
archive eventually containing the default shared archive member.
Retry with default member, getting same error in worst case. */
const char *member = LT_SHARED_LIB_MEMBER;

char *attempt = MALLOC (char, len + strlen (member) + 1);
if (!attempt)
{
LT__SETERROR (NO_MEMORY);
return module;
}

sprintf (attempt, "%s%s", filename, member);
module = vm_open (loader_data, attempt, advise);
FREE (attempt);
return module;
}
#endif

if (!module)
{
DL__SETERROR (CANNOT_OPEN);
@@ -205,7 +245,7 @@ vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
/* A function called through the vtable when a particular module
should be unloaded. */
static int
vm_close (lt_user_data LT__UNUSED loader_data, lt_module module)
vm_close (lt_user_data loader_data LT__UNUSED, lt_module module)
{
int errors = 0;

@@ -222,7 +262,7 @@ vm_close (lt_user_data LT__UNUSED loader_data, lt_module module)
/* A function called through the vtable to get the address of
a symbol loaded from a particular module. */
static void *
vm_sym (lt_user_data LT__UNUSED loader_data, lt_module module, const char *name)
vm_sym (lt_user_data loader_data LT__UNUSED, lt_module module, const char *name)
{
void *address = dlsym (module, name);

@@ -1,7 +1,7 @@
/* loader-dyld.c -- dynamic linking on darwin and OS X
Copyright (C) 1998, 1999, 2000, 2004, 2006,
2007, 2008 Free Software Foundation, Inc.
Copyright (C) 1998-2000, 2004, 2006-2008, 2011-2015 Free Software
Foundation, Inc.
Written by Peter O'Gorman, 1998
NOTE: The canonical source of this file is maintained with the
@@ -93,8 +93,8 @@ get_vtable (lt_user_data loader_data)
/* --- IMPLEMENTATION --- */


#if defined(HAVE_MACH_O_DYLD_H)
# if !defined(__APPLE_CC__) && !defined(__MWERKS__) && !defined(__private_extern__)
#if defined HAVE_MACH_O_DYLD_H
# if !defined __APPLE_CC__ && !defined __MWERKS__ && !defined __private_extern__
/* Is this correct? Does it still function properly? */
# define __private_extern__ extern
# endif
@@ -104,7 +104,7 @@ get_vtable (lt_user_data loader_data)
#include <mach-o/getsect.h>

/* We have to put some stuff here that isn't in older dyld.h files */
#if !defined(ENUM_DYLD_BOOL)
#if !defined ENUM_DYLD_BOOL
# define ENUM_DYLD_BOOL
# undef FALSE
# undef TRUE
@@ -113,46 +113,46 @@ get_vtable (lt_user_data loader_data)
TRUE
};
#endif
#if !defined(LC_REQ_DYLD)
#if !defined LC_REQ_DYLD
# define LC_REQ_DYLD 0x80000000
#endif
#if !defined(LC_LOAD_WEAK_DYLIB)
#if !defined LC_LOAD_WEAK_DYLIB
# define LC_LOAD_WEAK_DYLIB (0x18 | LC_REQ_DYLD)
#endif

#if !defined(NSADDIMAGE_OPTION_NONE)
#if !defined NSADDIMAGE_OPTION_NONE
# define NSADDIMAGE_OPTION_NONE 0x0
#endif
#if !defined(NSADDIMAGE_OPTION_RETURN_ON_ERROR)
#if !defined NSADDIMAGE_OPTION_RETURN_ON_ERROR
# define NSADDIMAGE_OPTION_RETURN_ON_ERROR 0x1
#endif
#if !defined(NSADDIMAGE_OPTION_WITH_SEARCHING)
#if !defined NSADDIMAGE_OPTION_WITH_SEARCHING
# define NSADDIMAGE_OPTION_WITH_SEARCHING 0x2
#endif
#if !defined(NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED)
#if !defined NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED
# define NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED 0x4
#endif
#if !defined(NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME)
#if !defined NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME
# define NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME 0x8
#endif

#if !defined(NSLOOKUPSYMBOLINIMAGE_OPTION_BIND)
#if !defined NSLOOKUPSYMBOLINIMAGE_OPTION_BIND
# define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND 0x0
#endif
#if !defined(NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW)
#if !defined NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW
# define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW 0x1
#endif
#if !defined(NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY)
#if !defined NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY
# define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY 0x2
#endif
#if !defined(NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR)
#if !defined NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR
# define NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR 0x4
#endif

#define LT__SYMLOOKUP_OPTS (NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW \
| NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR)

#if defined(__BIG_ENDIAN__)
#if defined __BIG_ENDIAN__
# define LT__MAGIC MH_MAGIC
#else
# define LT__MAGIC MH_CIGAM
@@ -185,7 +185,7 @@ static int dyld_cannot_close = 0;
/* A function called through the vtable when this loader is no
longer needed by the application. */
static int
vl_exit (lt_user_data LT__UNUSED loader_data)
vl_exit (lt_user_data loader_data LT__UNUSED)
{
vtable = NULL;
return 0;
@@ -226,7 +226,7 @@ vl_init (lt_user_data loader_data)
module for processing with this loader's other vtable functions. */
static lt_module
vm_open (lt_user_data loader_data, const char *filename,
lt_dladvise LT__UNUSED advise)
lt_dladvise advise LT__UNUSED)
{
lt_module module = 0;
NSObjectFileImage ofi = 0;
@@ -240,8 +240,8 @@ vm_open (lt_user_data loader_data, const char *filename,
{
case NSObjectFileImageSuccess:
module = NSLinkModule (ofi, filename, NSLINKMODULE_OPTION_RETURN_ON_ERROR
| NSLINKMODULE_OPTION_PRIVATE
| NSLINKMODULE_OPTION_BINDNOW);
| NSLINKMODULE_OPTION_PRIVATE
| NSLINKMODULE_OPTION_BINDNOW);
NSDestroyObjectFileImage (ofi);

if (module)
@@ -302,7 +302,7 @@ vm_close (lt_user_data loader_data, lt_module module)
{
flags |= NSUNLINKMODULE_OPTION_KEEP_MEMORY_MAPPED;
}
#if defined(__ppc__)
#if defined __ppc__
flags |= NSUNLINKMODULE_OPTION_RESET_LAZY_REFERENCES;
#endif
if (!NSUnLinkModule (module, flags))
@@ -350,7 +350,7 @@ vm_sym (lt_user_data loader_data, lt_module module, const char *name)

if (!nssym)
{
strncpy (saveError, dylderror (LT__STRERROR (SYMBOL_NOT_FOUND)), 255);
strlcpy (saveError, dylderror (LT__STRERROR (SYMBOL_NOT_FOUND)), 255);
saveError[255] = 0;
if (!mh)
{
@@ -1,7 +1,7 @@
/* loader-load_add_on.c -- dynamic linking for BeOS
Copyright (C) 1998, 1999, 2000, 2004, 2006,
2007, 2008 Free Software Foundation, Inc.
Copyright (C) 1998-2000, 2004, 2006-2008, 2011-2015 Free Software
Foundation, Inc.
Written by Thomas Tanner, 1998
NOTE: The canonical source of this file is maintained with the
@@ -95,7 +95,7 @@ get_vtable (lt_user_data loader_data)
/* A function called through the vtable when this loader is no
longer needed by the application. */
static int
vl_exit (lt_user_data LT__UNUSED loader_data)
vl_exit (lt_user_data loader_data LT__UNUSED)
{
vtable = NULL;
return 0;
@@ -105,8 +105,8 @@ vl_exit (lt_user_data LT__UNUSED loader_data)
loader. Returns an opaque representation of the newly opened
module for processing with this loader's other vtable functions. */
static lt_module
vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
lt_dladvise LT__UNUSED advise)
vm_open (lt_user_data loader_data LT__UNUSED, const char *filename,
lt_dladvise advise LT__UNUSED)
{
image_id image = 0;

@@ -135,7 +135,7 @@ vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
/* A function called through the vtable when a particular module
should be unloaded. */
static int
vm_close (lt_user_data LT__UNUSED loader_data, lt_module module)
vm_close (lt_user_data loader_data LT__UNUSED, lt_module module)
{
int errors = 0;

@@ -152,7 +152,7 @@ vm_close (lt_user_data LT__UNUSED loader_data, lt_module module)
/* A function called through the vtable to get the address of
a symbol loaded from a particular module. */
static void *
vm_sym (lt_user_data LT__UNUSED loader_data, lt_module module, const char *name)
vm_sym (lt_user_data loader_data LT__UNUSED, lt_module module, const char *name)
{
void *address = 0;
image_id image = (image_id) module;
@@ -1,7 +1,7 @@
/* loader-loadlibrary.c -- dynamic linking for Win32
Copyright (C) 1998, 1999, 2000, 2004, 2005, 2006,
2007, 2008, 2010 Free Software Foundation, Inc.
Copyright (C) 1998-2000, 2004-2008, 2010-2015 Free Software
Foundation, Inc.
Written by Thomas Tanner, 1998
NOTE: The canonical source of this file is maintained with the
@@ -32,7 +32,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
#include "lt__private.h"
#include "lt_dlloader.h"

#if defined(__CYGWIN__)
#if defined __CYGWIN__
# include <sys/cygwin.h>
#endif

@@ -120,7 +120,7 @@ static char *error_message = 0;
/* A function called through the vtable when this loader is no
longer needed by the application. */
static int
vl_exit (lt_user_data LT__UNUSED loader_data)
vl_exit (lt_user_data loader_data LT__UNUSED)
{
vtable = NULL;
LOCALFREE (error_message);
@@ -131,8 +131,8 @@ vl_exit (lt_user_data LT__UNUSED loader_data)
loader. Returns an opaque representation of the newly opened
module for processing with this loader's other vtable functions. */
static lt_module
vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
lt_dladvise LT__UNUSED advise)
vm_open (lt_user_data loader_data LT__UNUSED, const char *filename,
lt_dladvise advise LT__UNUSED)
{
lt_module module = 0;
char *ext;
@@ -163,7 +163,7 @@ vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
return 0;
}
len = 0;
#elif defined(__CYGWIN__)
#elif defined __CYGWIN__
cygwin_conv_to_full_win32_path (filename, wpath);
len = 0;
#else
@@ -173,8 +173,8 @@ vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
ext = strrchr (wpath, '.');
if (!ext)
{
/* Append a `.' to stop Windows from adding an
implicit `.dll' extension. */
/* Append a '.' to stop Windows from adding an
implicit '.dll' extension. */
if (!len)
len = strlen (wpath);

@@ -245,7 +245,7 @@ vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
/* A function called through the vtable when a particular module
should be unloaded. */
static int
vm_close (lt_user_data LT__UNUSED loader_data, lt_module module)
vm_close (lt_user_data loader_data LT__UNUSED, lt_module module)
{
int errors = 0;

@@ -262,7 +262,7 @@ vm_close (lt_user_data LT__UNUSED loader_data, lt_module module)
/* A function called through the vtable to get the address of
a symbol loaded from a particular module. */
static void *
vm_sym (lt_user_data LT__UNUSED loader_data, lt_module module, const char *name)
vm_sym (lt_user_data loader_data LT__UNUSED, lt_module module, const char *name)
{
void *address = (void *) GetProcAddress ((HMODULE) module, name);

@@ -306,7 +306,7 @@ loadlibraryerror (const char *default_errmsg)
return len ? error_message : default_errmsg;
}

/* A function called through the getthreaderrormode variable which checks
/* A function called through the getthreaderrormode variable that checks
if the system supports GetThreadErrorMode (or GetErrorMode) and arranges
for it or a fallback implementation to be called directly in the future.
The selected version is then called. */
@@ -339,7 +339,7 @@ fallback_getthreaderrormode (void)
return (DWORD) SetErrorMode (SEM_FAILCRITICALERRORS);
}

/* A function called through the setthreaderrormode variable which checks
/* A function called through the setthreaderrormode variable that checks
if the system supports SetThreadErrorMode and arranges for it or a
fallback implementation to be called directly in the future.
The selected version is then called. */
@@ -1,7 +1,7 @@
/* loader-preopen.c -- emulate dynamic linking using preloaded_symbols
Copyright (C) 1998, 1999, 2000, 2004, 2006,
2007, 2008 Free Software Foundation, Inc.
Copyright (C) 1998-2000, 2004, 2006-2008, 2011-2015 Free Software
Foundation, Inc.
Written by Thomas Tanner, 1998
NOTE: The canonical source of this file is maintained with the
@@ -113,7 +113,7 @@ static const lt_dlsymlist *default_preloaded_symbols = 0;

/* A function called through the vtable to initialise this loader. */
static int
vl_init (lt_user_data LT__UNUSED loader_data)
vl_init (lt_user_data loader_data LT__UNUSED)
{
int errors = 0;

@@ -130,7 +130,7 @@ vl_init (lt_user_data LT__UNUSED loader_data)
/* A function called through the vtable when this loader is no
longer needed by the application. */
static int
vl_exit (lt_user_data LT__UNUSED loader_data)
vl_exit (lt_user_data loader_data LT__UNUSED)
{
vtable = NULL;
free_symlists ();
@@ -142,8 +142,8 @@ vl_exit (lt_user_data LT__UNUSED loader_data)
loader. Returns an opaque representation of the newly opened
module for processing with this loader's other vtable functions. */
static lt_module
vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
lt_dladvise LT__UNUSED advise)
vm_open (lt_user_data loader_data LT__UNUSED, const char *filename,
lt_dladvise advise LT__UNUSED)
{
symlist_chain *lists;
lt_module module = 0;
@@ -168,7 +168,7 @@ vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
const lt_dlsymlist *symbol;
for (symbol= lists->symlist; symbol->name; ++symbol)
{
if (!symbol->address && streq (symbol->name, filename))
if (!symbol->address && STREQ (symbol->name, filename))
{
/* If the next symbol's name and address is 0, it means
the module just contains the originator and no symbols.
@@ -195,7 +195,7 @@ vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
/* A function called through the vtable when a particular module
should be unloaded. */
static int
vm_close (lt_user_data LT__UNUSED loader_data, lt_module LT__UNUSED module)
vm_close (lt_user_data loader_data LT__UNUSED, lt_module module LT__UNUSED)
{
/* Just to silence gcc -Wall */
module = 0;
@@ -206,15 +206,20 @@ vm_close (lt_user_data LT__UNUSED loader_data, lt_module LT__UNUSED module)
/* A function called through the vtable to get the address of
a symbol loaded from a particular module. */
static void *
vm_sym (lt_user_data LT__UNUSED loader_data, lt_module module, const char *name)
vm_sym (lt_user_data loader_data LT__UNUSED, lt_module module, const char *name)
{
lt_dlsymlist *symbol = (lt_dlsymlist*) module;

if (symbol[1].name && STREQ (symbol[1].name, "@INIT@"))
{
symbol++; /* Skip optional init entry. */
}

symbol +=2; /* Skip header (originator then libname). */

while (symbol->name)
{
if (streq (symbol->name, name))
if (STREQ (symbol->name, name))
{
return symbol->address;
}
@@ -273,6 +278,13 @@ add_symlist (const lt_dlsymlist *symlist)
tmp->symlist = symlist;
tmp->next = preloaded_symlists;
preloaded_symlists = tmp;

if (symlist[1].name && STREQ (symlist[1].name, "@INIT@"))
{
void (*init_symlist)(void);
*(void **)(&init_symlist) = symlist[1].address;
(*init_symlist)();
}
}
else
{
@@ -336,8 +348,8 @@ lt_dlpreload_open (const char *originator, lt_dlpreload_callback_func *func)
for (list = preloaded_symlists; list; list = list->next)
{
/* ...that was preloaded by the requesting ORIGINATOR... */
if ((originator && streq (list->symlist->name, originator))
|| (!originator && streq (list->symlist->name, "@PROGRAM@")))
if ((originator && STREQ (list->symlist->name, originator))
|| (!originator && STREQ (list->symlist->name, "@PROGRAM@")))
{
const lt_dlsymlist *symbol;
unsigned int idx = 0;
@@ -349,7 +361,7 @@ lt_dlpreload_open (const char *originator, lt_dlpreload_callback_func *func)
while ((symbol = &list->symlist[++idx])->name != 0)
{
if ((symbol->address == 0)
&& (strneq (symbol->name, "@PROGRAM@")))
&& (STRNEQ (symbol->name, "@PROGRAM@")))
{
lt_dlhandle handle = lt_dlopen (symbol->name);
if (handle == 0)
@@ -1,7 +1,7 @@
/* loader-shl_load.c -- dynamic linking with shl_load (HP-UX)
Copyright (C) 1998, 1999, 2000, 2004, 2006,
2007, 2008 Free Software Foundation, Inc.
Copyright (C) 1998-2000, 2004, 2006-2008, 2011-2015 Free Software
Foundation, Inc.
Written by Thomas Tanner, 1998
NOTE: The canonical source of this file is maintained with the
@@ -90,7 +90,7 @@ get_vtable (lt_user_data loader_data)
/* --- IMPLEMENTATION --- */


#if defined(HAVE_DL_H)
#if defined HAVE_DL_H
# include <dl.h>
#endif

@@ -103,11 +103,11 @@ get_vtable (lt_user_data loader_data)
*
* Optionally:
* BIND_FIRST - Place the library at the head of the symbol search
* order.
* order.
* BIND_NONFATAL - The default BIND_IMMEDIATE behavior is to treat all
* unsatisfied symbols as fatal. This flag allows
* binding of unsatisfied code symbols to be deferred
* until use.
* unsatisfied symbols as fatal. This flag allows
* binding of unsatisfied code symbols to be deferred
* until use.
* [Perl: For certain libraries, like DCE, deferred
* binding often causes run time problems. Adding
* BIND_NONFATAL to BIND_IMMEDIATE still allows
@@ -125,10 +125,10 @@ get_vtable (lt_user_data loader_data)
* library specified by the path argument.
*/

#if !defined(DYNAMIC_PATH)
#if !defined DYNAMIC_PATH
# define DYNAMIC_PATH 0
#endif
#if !defined(BIND_RESTRICTED)
#if !defined BIND_RESTRICTED
# define BIND_RESTRICTED 0
#endif

@@ -138,7 +138,7 @@ get_vtable (lt_user_data loader_data)
/* A function called through the vtable when this loader is no
longer needed by the application. */
static int
vl_exit (lt_user_data LT__UNUSED loader_data)
vl_exit (lt_user_data loader_data LT__UNUSED)
{
vtable = NULL;
return 0;
@@ -148,8 +148,8 @@ vl_exit (lt_user_data LT__UNUSED loader_data)
loader. Returns an opaque representation of the newly opened
module for processing with this loader's other vtable functions. */
static lt_module
vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
lt_dladvise LT__UNUSED advise)
vm_open (lt_user_data loader_data LT__UNUSED, const char *filename,
lt_dladvise advise LT__UNUSED)
{
static shl_t self = (shl_t) 0;
lt_module module = shl_load (filename, LT_BIND_FLAGS, 0L);
@@ -184,7 +184,7 @@ vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
/* A function called through the vtable when a particular module
should be unloaded. */
static int
vm_close (lt_user_data LT__UNUSED loader_data, lt_module module)
vm_close (lt_user_data loader_data LT__UNUSED, lt_module module)
{
int errors = 0;

@@ -201,7 +201,7 @@ vm_close (lt_user_data LT__UNUSED loader_data, lt_module module)
/* A function called through the vtable to get the address of
a symbol loaded from a particular module. */
static void *
vm_sym (lt_user_data LT__UNUSED loader_data, lt_module module, const char *name)
vm_sym (lt_user_data loader_data LT__UNUSED, lt_module module, const char *name)
{
void *address = 0;

@@ -1,6 +1,7 @@
/* lt__alloc.c -- internal memory management interface
Copyright (C) 2004, 2006, 2007 Free Software Foundation, Inc.
Copyright (C) 2004, 2006-2007, 2011-2015 Free Software Foundation,
Inc.
Written by Gary V. Vaughan, 2004
NOTE: The canonical source of this file is maintained with the
@@ -1,6 +1,7 @@
/* argz.c -- argz implementation for non-glibc systems
/* lt__argz.c -- argz implementation for non-glibc systems
Copyright (C) 2004, 2006, 2007, 2008 Free Software Foundation, Inc.
Copyright (C) 2004, 2006-2008, 2011-2015 Free Software Foundation,
Inc.
Written by Gary V. Vaughan, 2004
NOTE: The canonical source of this file is maintained with the
@@ -28,16 +29,15 @@ or obtained by writing to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

#if defined(LTDL) && defined LT_CONFIG_H
#if defined LTDL && defined LT_CONFIG_H
# include LT_CONFIG_H
#else
# include <config.h>
#endif

#include <argz.h>
#include <lt__argz.h>

#include <assert.h>
#include <stddef.h>
#include <stdlib.h>
#include <sys/types.h>
#include <errno.h>
@@ -223,4 +223,3 @@ argz_stringify (char *argz, size_t argz_len, int sep)
}
}
}

@@ -1,6 +1,6 @@
/* lt__dirent.c -- internal directory entry scanning interface
Copyright (C) 2001, 2004 Free Software Foundation, Inc.
Copyright (C) 2001, 2004, 2011-2015 Free Software Foundation, Inc.
Written by Bob Friesenhahn, 2001
NOTE: The canonical source of this file is maintained with the
@@ -31,18 +31,17 @@ or obtained by writing to the Free Software Foundation, Inc.,
#include "lt__private.h"

#include <assert.h>
#include <stddef.h>

#include "lt__dirent.h"

#if defined(__WINDOWS__)
#if defined __WINDOWS__

void
closedir (DIR *entry)
{
assert (entry != (DIR *) NULL);
FindClose (entry->hSearch);
free ((void *) entry);
free (entry);
}


@@ -104,4 +103,4 @@ readdir (DIR *entry)
return &entry->file_info;
}

#endif /*defined(__WINDOWS__)*/
#endif /*defined __WINDOWS__*/
@@ -1,6 +1,6 @@
/* lt__strl.c -- size-bounded string copying and concatenation
Copyright (C) 2004 Free Software Foundation, Inc.
Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
Written by Bob Friesenhahn, 2004
NOTE: The canonical source of this file is maintained with the
@@ -36,17 +36,17 @@ or obtained by writing to the Free Software Foundation, Inc.,
/*
lt_strlcat appends the NULL-terminated string src to the end of dst.
It will append at most dstsize - strlen(dst) - 1 bytes,
NULL-terminating the result. The total length of the string which
NULL-terminating the result. The total length of the string that
would have been created given sufficient buffer size (may be longer
than dstsize) is returned. This function substitutes for strlcat()
than dstsize) is returned. This function substitutes for strlcat(),
which is available under NetBSD, FreeBSD and Solaris 9.
Buffer overflow can be checked as follows:
if (lt_strlcat(dst, src, dstsize) >= dstsize)
return -1;
*/
#if !defined(HAVE_STRLCAT)
#if !defined HAVE_STRLCAT
size_t
lt_strlcat(char *dst, const char *src, const size_t dstsize)
{
@@ -65,7 +65,7 @@ lt_strlcat(char *dst, const char *src, const size_t dstsize)
size - 1.
*/
for ( p = dst + length, q = src;
(*q != 0) && (length < dstsize - 1) ;
(*q != 0) && (length < dstsize - 1);
length++, p++, q++ )
*p = *q;

@@ -79,22 +79,22 @@ lt_strlcat(char *dst, const char *src, const size_t dstsize)

return length;
}
#endif /* !defined(HAVE_STRLCAT) */
#endif /* !defined HAVE_STRLCAT */

/*
lt_strlcpy copies up to dstsize - 1 characters from the NULL-terminated
string src to dst, NULL-terminating the result. The total length of
the string which would have been created given sufficient buffer
the string that would have been created given sufficient buffer
size (may be longer than dstsize) is returned. This function
substitutes for strlcpy() which is available under OpenBSD, FreeBSD
substitutes for strlcpy(), which is available under OpenBSD, FreeBSD
and Solaris 9.
Buffer overflow can be checked as follows:
if (lt_strlcpy(dst, src, dstsize) >= dstsize)
return -1;
*/
#if !defined(HAVE_STRLCPY)
#if !defined HAVE_STRLCPY
size_t
lt_strlcpy(char *dst, const char *src, const size_t dstsize)
{
@@ -109,8 +109,8 @@ lt_strlcpy(char *dst, const char *src, const size_t dstsize)
/*
Copy src to dst within bounds of size-1.
*/
for ( p=dst, q=src, length=0 ;
(*q != 0) && (length < dstsize-1) ;
for ( p=dst, q=src, length=0;
(*q != 0) && (length < dstsize-1);
length++, p++, q++ )
*p = *q;

@@ -124,4 +124,4 @@ lt_strlcpy(char *dst, const char *src, const size_t dstsize)

return length;
}
#endif /* !defined(HAVE_STRLCPY) */
#endif /* !defined HAVE_STRLCPY */
@@ -1,6 +1,7 @@
/* lt_dlloader.c -- dynamic library loader interface
Copyright (C) 2004, 2007, 2008 Free Software Foundation, Inc.
Copyright (C) 2004, 2007-2008, 2011-2015 Free Software Foundation,
Inc.
Written by Gary V. Vaughan, 2004
NOTE: The canonical source of this file is maintained with the
@@ -52,7 +53,7 @@ loader_callback (SList *item, void *userdata)

assert (vtable);

return streq (vtable->name, name) ? (void *) item : NULL;
return STREQ (vtable->name, name) ? (void *) item : NULL;
}


@@ -165,7 +166,7 @@ lt_dlloader_remove (const char *name)
return 0;
}

/* Fail if there are any open modules which use this loader. */
/* Fail if there are any open modules that use this loader. */
iface = lt_dlinterface_register (id_string, NULL);
while ((handle = lt_dlhandle_iterate (iface, handle)))
{
@@ -1,6 +1,7 @@
/* lt_error.c -- error propogation interface
/* lt_error.c -- error propagation interface
Copyright (C) 1999, 2000, 2001, 2004, 2005, 2007 Free Software Foundation, Inc.
Copyright (C) 1999-2001, 2004-2005, 2007, 2011-2015 Free Software
Foundation, Inc.
Written by Thomas Tanner, 1999
NOTE: The canonical source of this file is maintained with the
@@ -1,7 +1,7 @@
/* ltdl.c -- system independent dlopen wrapper
Copyright (C) 1998, 1999, 2000, 2004, 2005, 2006,
2007, 2008, 2011 Free Software Foundation, Inc.
Copyright (C) 1998-2000, 2004-2008, 2011-2015 Free Software
Foundation, Inc.
Written by Thomas Tanner, 1998
NOTE: The canonical source of this file is maintained with the
@@ -46,15 +46,15 @@ or obtained by writing to the Free Software Foundation, Inc.,
#define LT_ARCHIVE_EXT ".la"

/* max. filename length */
#if !defined(LT_FILENAME_MAX)
#if !defined LT_FILENAME_MAX
# define LT_FILENAME_MAX 1024
#endif

#if !defined(LT_LIBEXT)
#if !defined LT_LIBEXT
# define LT_LIBEXT "a"
#endif

#if !defined(LT_LIBPREFIX)
#if !defined LT_LIBPREFIX
# define LT_LIBPREFIX "lib"
#endif

@@ -77,15 +77,15 @@ static const char objdir[] = LT_OBJDIR;
static const char archive_ext[] = LT_ARCHIVE_EXT;
static const char libext[] = LT_LIBEXT;
static const char libprefix[] = LT_LIBPREFIX;
#if defined(LT_MODULE_EXT)
#if defined LT_MODULE_EXT
static const char shlib_ext[] = LT_MODULE_EXT;
#endif
/* If the loadable module suffix is not the same as the linkable
* shared library suffix, this will be defined. */
#if defined(LT_SHARED_EXT)
#if defined LT_SHARED_EXT
static const char shared_ext[] = LT_SHARED_EXT;
#endif
#if defined(LT_DLSEARCH_PATH)
#if defined LT_DLSEARCH_PATH
static const char sys_dlsearch_path[] = LT_DLSEARCH_PATH;
#endif

@@ -306,7 +306,7 @@ lt_dlexit (void)
++errors;
}
/* Make sure that the handle pointed to by 'cur' still exists.
lt_dlclose recursively closes dependent libraries which removes
lt_dlclose recursively closes dependent libraries, which removes
them from the linked list. One of these might be the one
pointed to by 'cur'. */
if (cur)
@@ -385,7 +385,7 @@ tryall_dlopen (lt_dlhandle *phandle, const char *filename,
{
if ((handle->info.filename == filename) /* dlopen self: 0 == 0 */
|| (handle->info.filename && filename
&& streq (handle->info.filename, filename)))
&& STREQ (handle->info.filename, filename)))
{
break;
}
@@ -444,8 +444,15 @@ tryall_dlopen (lt_dlhandle *phandle, const char *filename,
handle->module = (*loader_vtable->module_open) (loader_vtable->dlloader_data,
filename, advise);
#ifdef LT_DEBUG_LOADERS
fprintf (stderr, " Result: %s\n",
handle->module ? "Success" : "Failed");
if (!handle->module) {
char *error;
LT__GETERROR(error);
fprintf (stderr, " Result: Failed\n"
" Error message << %s >>\n",
error ? error : "(null)");
} else {
fprintf (stderr, " Result: Success\n");
}
#endif

if (handle->module != 0)
@@ -495,7 +502,7 @@ tryall_dlopen_module (lt_dlhandle *handle, const char *prefix,
assert (handle);
assert (dirname);
assert (dlname);
#if defined(LT_DIRSEP_CHAR)
#if defined LT_DIRSEP_CHAR
/* Only canonicalized names (i.e. with DIRSEP chars already converted)
should make it into this function: */
assert (strchr (dirname, LT_DIRSEP_CHAR) == 0);
@@ -606,7 +613,7 @@ canonicalize_path (const char *path, char **pcanonical)

/* Anything other than a directory separator is copied verbatim. */
if ((path[src] != '/')
#if defined(LT_DIRSEP_CHAR)
#if defined LT_DIRSEP_CHAR
&& (path[src] != LT_DIRSEP_CHAR)
#endif
)
@@ -618,7 +625,7 @@ canonicalize_path (const char *path, char **pcanonical)
NULL terminator. */
else if ((path[1+ src] != LT_PATHSEP_CHAR)
&& (path[1+ src] != LT_EOS_CHAR)
#if defined(LT_DIRSEP_CHAR)
#if defined LT_DIRSEP_CHAR
&& (path[1+ src] != LT_DIRSEP_CHAR)
#endif
&& (path[1+ src] != '/'))
@@ -806,15 +813,15 @@ find_handle (const char *search_path, const char *base_name,
return phandle;
}

#if !defined(LTDL_DLOPEN_DEPLIBS)
#if !defined LTDL_DLOPEN_DEPLIBS
static int
load_deplibs (lt_dlhandle handle, char * LT__UNUSED deplibs)
load_deplibs (lt_dlhandle handle, char * deplibs LT__UNUSED)
{
handle->depcount = 0;
return 0;
}

#else /* defined(LTDL_DLOPEN_DEPLIBS) */
#else /* defined LTDL_DLOPEN_DEPLIBS */
static int
load_deplibs (lt_dlhandle handle, char *deplibs)
{
@@ -969,7 +976,7 @@ load_deplibs (lt_dlhandle handle, char *deplibs)

return errors;
}
#endif /* defined(LTDL_DLOPEN_DEPLIBS) */
#endif /* defined LTDL_DLOPEN_DEPLIBS */

static int
unload_deplibs (lt_dlhandle handle)
@@ -1108,11 +1115,11 @@ parse_dotla_file(FILE *file, char **dlname, char **libdir, char **deplibs,
{
errors += trim (deplibs, &line[sizeof (STR_DL_DEPLIBS) - 1]);
}
else if (streq (line, "installed=yes\n"))
else if (STREQ (line, "installed=yes\n"))
{
*installed = 1;
}
else if (streq (line, "installed=no\n"))
else if (STREQ (line, "installed=no\n"))
{
*installed = 0;
}
@@ -1233,7 +1240,7 @@ try_dlopen (lt_dlhandle *phandle, const char *filename, const char *ext,
goto cleanup;
}

strncpy (dir, canonical, dirlen);
strlcpy (dir, canonical, dirlen);
dir[dirlen] = LT_EOS_CHAR;

++base_name;
@@ -1274,7 +1281,7 @@ try_dlopen (lt_dlhandle *phandle, const char *filename, const char *ext,
name[ext - base_name] = LT_EOS_CHAR;
}

/* Before trawling through the filesystem in search of a module,
/* Before trawling through the file system in search of a module,
check whether we are opening a preloaded module. */
if (!dir)
{
@@ -1324,7 +1331,7 @@ try_dlopen (lt_dlhandle *phandle, const char *filename, const char *ext,
}

/* Check whether we are opening a libtool module (.la extension). */
if (ext && streq (ext, archive_ext))
if (ext && STREQ (ext, archive_ext))
{
/* this seems to be a libtool module */
FILE * file = 0;
@@ -1356,15 +1363,15 @@ try_dlopen (lt_dlhandle *phandle, const char *filename, const char *ext,
file = find_file (search_path, base_name, &dir);
}

#if defined(LT_MODULE_PATH_VAR)
#if defined LT_MODULE_PATH_VAR
if (!file)
{
search_path = getenv (LT_MODULE_PATH_VAR);
if (search_path)
file = find_file (search_path, base_name, &dir);
}
#endif
#if defined(LT_DLSEARCH_PATH)
#if defined LT_DLSEARCH_PATH
if (!file && *sys_dlsearch_path)
{
file = find_file (sys_dlsearch_path, base_name, &dir);
@@ -1461,11 +1468,11 @@ try_dlopen (lt_dlhandle *phandle, const char *filename, const char *ext,
&newhandle, advise)
&& !find_handle (getenv (LTDL_SEARCHPATH_VAR), base_name,
&newhandle, advise)
#if defined(LT_MODULE_PATH_VAR)
#if defined LT_MODULE_PATH_VAR
&& !find_handle (getenv (LT_MODULE_PATH_VAR), base_name,
&newhandle, advise)
#endif
#if defined(LT_DLSEARCH_PATH)
#if defined LT_DLSEARCH_PATH
&& !find_handle (sys_dlsearch_path, base_name,
&newhandle, advise)
#endif
@@ -1512,7 +1519,7 @@ try_dlopen (lt_dlhandle *phandle, const char *filename, const char *ext,
}


/* If the last error message stored was `FILE_NOT_FOUND', then return
/* If the last error message stored was 'FILE_NOT_FOUND', then return
non-zero. */
static int
file_not_found (void)
@@ -1538,12 +1545,12 @@ has_library_ext (const char *filename)

ext = strrchr (filename, '.');

if (ext && ((streq (ext, archive_ext))
#if defined(LT_MODULE_EXT)
|| (streq (ext, shlib_ext))
if (ext && ((STREQ (ext, archive_ext))
#if defined LT_MODULE_EXT
|| (STREQ (ext, shlib_ext))
#endif
#if defined(LT_SHARED_EXT)
|| (streq (ext, shared_ext))
#if defined LT_SHARED_EXT
|| (STREQ (ext, shared_ext))
#endif
))
{
@@ -1680,7 +1687,7 @@ lt_dlopenadvise (const char *filename, lt_dladvise advise)
if (handle || ((errors > 0) && !file_not_found ()))
return handle;

#if defined(LT_MODULE_EXT)
#if defined LT_MODULE_EXT
/* Try appending SHLIB_EXT. */
LT__SETERRORSTR (saved_error);
errors = try_dlopen (&handle, filename, shlib_ext, advise);
@@ -1691,7 +1698,7 @@ lt_dlopenadvise (const char *filename, lt_dladvise advise)
return handle;
#endif

#if defined(LT_SHARED_EXT)
#if defined LT_SHARED_EXT
/* Try appending SHARED_EXT. */
LT__SETERRORSTR (saved_error);
errors = try_dlopen (&handle, filename, shared_ext, advise);
@@ -1919,14 +1926,14 @@ lt_dlforeachfile (const char *search_path,
foreachfile_callback, fpptr, data);
}

#if defined(LT_MODULE_PATH_VAR)
#if defined LT_MODULE_PATH_VAR
if (!is_done)
{
is_done = foreach_dirinpath (getenv(LT_MODULE_PATH_VAR), 0,
foreachfile_callback, fpptr, data);
}
#endif
#if defined(LT_DLSEARCH_PATH)
#if defined LT_DLSEARCH_PATH
if (!is_done && *sys_dlsearch_path)
{
is_done = foreach_dirinpath (sys_dlsearch_path, 0,
@@ -2281,7 +2288,7 @@ lt_dlisresident (lt_dlhandle handle)
/* --- MODULE INFORMATION --- */

typedef struct {
const char *id_string;
char *id_string;
lt_dlhandle_interface *iface;
} lt__interface_id;

@@ -2428,7 +2435,7 @@ lt_dlhandle_fetch (lt_dlinterface_id iface, const char *module_name)
while ((handle = lt_dlhandle_iterate (iface, handle)))
{
lt_dlhandle cur = handle;
if (cur && cur->info.name && streq (cur->info.name, module_name))
if (cur && cur->info.name && STREQ (cur->info.name, module_name))
break;
}

@@ -1,7 +1,7 @@
/* ltdl.h -- generic dlopen functions
Copyright (C) 1998-2000, 2004, 2005,
2007, 2008 Free Software Foundation, Inc.
Copyright (C) 1998-2000, 2004-2005, 2007-2008, 2011-2015 Free
Software Foundation, Inc.
Written by Thomas Tanner, 1998
NOTE: The canonical source of this file is maintained with the
@@ -30,7 +30,7 @@ or obtained by writing to the Free Software Foundation, Inc.,
*/

/* Only include this header file once. */
#if !defined(LTDL_H)
#if !defined LTDL_H
#define LTDL_H 1

#include <libltdl/lt_system.h>
@@ -57,7 +57,7 @@ LT_SCOPE int lt_dlexit (void);
LT_SCOPE int lt_dladdsearchdir (const char *search_dir);
LT_SCOPE int lt_dlinsertsearchdir (const char *before,
const char *search_dir);
LT_SCOPE int lt_dlsetsearchpath (const char *search_path);
LT_SCOPE int lt_dlsetsearchpath (const char *search_path);
LT_SCOPE const char *lt_dlgetsearchpath (void);
LT_SCOPE int lt_dlforeachfile (
const char *search_path,
@@ -160,4 +160,4 @@ LT_SCOPE int lt_dlisresident (lt_dlhandle handle);

LT_END_C_DECLS

#endif /*!defined(LTDL_H)*/
#endif /*!defined LTDL_H*/
@@ -1,6 +1,7 @@
/* slist.c -- generalised singly linked lists
Copyright (C) 2000, 2004, 2007, 2008, 2009 Free Software Foundation, Inc.
Copyright (C) 2000, 2004, 2007-2009, 2011-2015 Free Software
Foundation, Inc.
Written by Gary V. Vaughan, 2000
NOTE: The canonical source of this file is maintained with the
@@ -31,7 +32,6 @@ or obtained by writing to the Free Software Foundation, Inc.,
#include <assert.h>

#include "slist.h"
#include <stddef.h>
#include <stdlib.h>

static SList * slist_sort_merge (SList *left, SList *right,
@@ -230,7 +230,7 @@ slist_reverse (SList *slist)
next = slist->next;
slist->next = result;
result = slist;
slist = next;
slist = next;
}

return result;
@@ -345,7 +345,7 @@ slist_sort (SList *slist, SListCompare *compare, void *userdata)
used for the boxes. It us usually a very bad idea to mix boxed and
non-boxed items in a single list. */

/* Return a `boxed' freshly mallocated 1 element list containing
/* Return a 'boxed' freshly mallocated 1 element list containing
USERDATA. */
SList *
slist_box (const void *userdata)
@@ -361,7 +361,7 @@ slist_box (const void *userdata)
return item;
}

/* Return the contents of a `boxed' ITEM, recycling the box itself. */
/* Return the contents of a 'boxed' ITEM, recycling the box itself. */
void *
slist_unbox (SList *item)
{
5,495 ltmain.sh

Large diffs are not rendered by default.

@@ -0,0 +1,8 @@
AC_DEFUN([AX_ARG_ENABLE_ASSERT],[
AC_ARG_ENABLE(assert, AS_HELP_STRING([--enable-assert],
[Enable assert() statements]),
[assert=$enableval], [assert=no])
AS_IF([test "$assert" = "no"],
[AC_DEFINE(NDEBUG, 1, [Define to disable assert() statements.])])
])
@@ -0,0 +1,7 @@
AC_DEFUN([AX_ARG_LIBGEOIP],[
AC_ARG_ENABLE(libgeoip,
[AS_HELP_STRING([--disable-libgeoip],[Disable GeoIP support])], [],
[AC_CHECK_HEADER(GeoIP.h,
[AC_SEARCH_LIBS(GeoIP_id_by_ipnum_v6_gl, GeoIP,
[AC_DEFINE(HAVE_LIBGEOIP, 1, [Define to 1 if libGeoIP (-lGeoIP) is available.])])])], [])
])

Large diffs are not rendered by default.

@@ -1,32 +1,30 @@
# Portability macros for glibc argz. -*- Autoconf -*-
#
# Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
# Copyright (C) 2004-2007, 2011-2015 Free Software Foundation, Inc.
# Written by Gary V. Vaughan <gary@gnu.org>
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.

# serial 5 argz.m4

AC_DEFUN([gl_FUNC_ARGZ],
[gl_PREREQ_ARGZ
# serial 1 ltargz.m4

AC_DEFUN([LT_FUNC_ARGZ], [
AC_CHECK_HEADERS([argz.h], [], [], [AC_INCLUDES_DEFAULT])
AC_CHECK_TYPES([error_t],
[],
[AC_DEFINE([error_t], [int],
[Define to a type to use for `error_t' if it is not otherwise available.])
[Define to a type to use for 'error_t' if it is not otherwise available.])
AC_DEFINE([__error_t_defined], [1], [Define so that glibc/gnulib argp.h
does not typedef error_t.])],
[#if defined(HAVE_ARGZ_H)
# include <argz.h>
#endif])
ARGZ_H=
LT_ARGZ_H=
AC_CHECK_FUNCS([argz_add argz_append argz_count argz_create_sep argz_insert \
argz_next argz_stringify], [], [ARGZ_H=argz.h; AC_LIBOBJ([argz])])
argz_next argz_stringify], [], [LT_ARGZ_H=lt__argz.h; AC_LIBOBJ([lt__argz])])
dnl if have system argz functions, allow forced use of
dnl libltdl-supplied implementation (and default to do so
@@ -37,14 +35,14 @@ dnl provides them, yet they are broken, is cygwin
dnl releases prior to 16-Mar-2007 (1.5.24 and earlier)
dnl So, it's more straightforward simply to special case
dnl this for known bad systems.
AS_IF([test -z "$ARGZ_H"],
AS_IF([test -z "$LT_ARGZ_H"],
[AC_CACHE_CHECK(
[if argz actually works],
[lt_cv_sys_argz_works],
[[case $host_os in #(
*cygwin*)
lt_cv_sys_argz_works=no
if test "$cross_compiling" != no; then
if test no != "$cross_compiling"; then
lt_cv_sys_argz_works="guessing no"
else
lt_sed_extract_leading_digits='s/^\([0-9\.]*\).*/\1/'
@@ -55,25 +53,22 @@ AS_IF([test -z "$ARGZ_H"],
lt_os_major=${2-0}
lt_os_minor=${3-0}
lt_os_micro=${4-0}
if test "$lt_os_major" -gt 1 \
|| { test "$lt_os_major" -eq 1 \
&& { test "$lt_os_minor" -gt 5 \
|| { test "$lt_os_minor" -eq 5 \
&& test "$lt_os_micro" -gt 24; }; }; }; then
if test 1 -lt "$lt_os_major" \
|| { test 1 -eq "$lt_os_major" \
&& { test 5 -lt "$lt_os_minor" \
|| { test 5 -eq "$lt_os_minor" \
&& test 24 -lt "$lt_os_micro"; }; }; }; then
lt_cv_sys_argz_works=yes
fi
fi
;; #(
*) lt_cv_sys_argz_works=yes ;;
esac]])
AS_IF([test "$lt_cv_sys_argz_works" = yes],
AS_IF([test yes = "$lt_cv_sys_argz_works"],
[AC_DEFINE([HAVE_WORKING_ARGZ], 1,
[This value is set to 1 to indicate that the system argz facility works])],
[ARGZ_H=argz.h
AC_LIBOBJ([argz])])])
[LT_ARGZ_H=lt__argz.h
AC_LIBOBJ([lt__argz])])])
AC_SUBST([ARGZ_H])
AC_SUBST([LT_ARGZ_H])
])

# Prerequisites of lib/argz.c.
AC_DEFUN([gl_PREREQ_ARGZ], [:])

Large diffs are not rendered by default.

@@ -1,14 +1,14 @@
# Helper functions for option handling. -*- Autoconf -*-
#
# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
# Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
# This file is free software; the Free Software Foundation gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.

# serial 7 ltoptions.m4
# serial 8 ltoptions.m4

# This is to help aclocal find these macros, as it can't see m4_define.
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
@@ -29,7 +29,7 @@ m4_define([_LT_SET_OPTION],
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
_LT_MANGLE_DEFUN([$1], [$2]),
[m4_warning([Unknown $1 option `$2'])])[]dnl
[m4_warning([Unknown $1 option '$2'])])[]dnl
])


@@ -75,13 +75,15 @@ m4_if([$1],[LT_INIT],[
dnl
dnl If no reference was made to various pairs of opposing options, then
dnl we run the default mode handler for the pair. For example, if neither
dnl `shared' nor `disable-shared' was passed, we enable building of shared
dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
dnl archives by default:
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
[_LT_ENABLE_FAST_INSTALL])
[_LT_ENABLE_FAST_INSTALL])
_LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
[_LT_WITH_AIX_SONAME([aix])])
])
])# _LT_SET_OPTIONS

@@ -112,7 +114,7 @@ AU_DEFUN([AC_LIBTOOL_DLOPEN],
[_LT_SET_OPTION([LT_INIT], [dlopen])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
put the `dlopen' option into LT_INIT's first parameter.])
put the 'dlopen' option into LT_INIT's first parameter.])
])

dnl aclocal-1.4 backwards compatibility:
@@ -148,7 +150,7 @@ AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
_LT_SET_OPTION([LT_INIT], [win32-dll])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
put the `win32-dll' option into LT_INIT's first parameter.])
put the 'win32-dll' option into LT_INIT's first parameter.])
])

dnl aclocal-1.4 backwards compatibility:
@@ -157,9 +159,9 @@ dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])

# _LT_ENABLE_SHARED([DEFAULT])
# ----------------------------
# implement the --enable-shared flag, and supports the `shared' and
# `disable-shared' LT_INIT options.
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
# implement the --enable-shared flag, and supports the 'shared' and
# 'disable-shared' LT_INIT options.
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
m4_define([_LT_ENABLE_SHARED],
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([shared],
@@ -172,14 +174,14 @@ AC_ARG_ENABLE([shared],
*)
enable_shared=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for pkg in $enableval; do
IFS="$lt_save_ifs"
IFS=$lt_save_ifs
if test "X$pkg" = "X$p"; then
enable_shared=yes
fi
done
IFS="$lt_save_ifs"
IFS=$lt_save_ifs
;;
esac],
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
@@ -211,9 +213,9 @@ dnl AC_DEFUN([AM_DISABLE_SHARED], [])

# _LT_ENABLE_STATIC([DEFAULT])
# ----------------------------
# implement the --enable-static flag, and support the `static' and
# `disable-static' LT_INIT options.
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
# implement the --enable-static flag, and support the 'static' and
# 'disable-static' LT_INIT options.
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
m4_define([_LT_ENABLE_STATIC],
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([static],
@@ -226,14 +228,14 @@ AC_ARG_ENABLE([static],
*)
enable_static=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for pkg in $enableval; do
IFS="$lt_save_ifs"
IFS=$lt_save_ifs
if test "X$pkg" = "X$p"; then
enable_static=yes
fi
done
IFS="$lt_save_ifs"
IFS=$lt_save_ifs
;;
esac],
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
@@ -265,9 +267,9 @@ dnl AC_DEFUN([AM_DISABLE_STATIC], [])

# _LT_ENABLE_FAST_INSTALL([DEFAULT])
# ----------------------------------
# implement the --enable-fast-install flag, and support the `fast-install'
# and `disable-fast-install' LT_INIT options.
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
# implement the --enable-fast-install flag, and support the 'fast-install'
# and 'disable-fast-install' LT_INIT options.
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
m4_define([_LT_ENABLE_FAST_INSTALL],
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
AC_ARG_ENABLE([fast-install],
@@ -280,14 +282,14 @@ AC_ARG_ENABLE([fast-install],
*)
enable_fast_install=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for pkg in $enableval; do
IFS="$lt_save_ifs"
IFS=$lt_save_ifs
if test "X$pkg" = "X$p"; then
enable_fast_install=yes
fi
done
IFS="$lt_save_ifs"
IFS=$lt_save_ifs
;;
esac],
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
@@ -304,26 +306,79 @@ AU_DEFUN([AC_ENABLE_FAST_INSTALL],
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
the `fast-install' option into LT_INIT's first parameter.])
the 'fast-install' option into LT_INIT's first parameter.])
])

AU_DEFUN([AC_DISABLE_FAST_INSTALL],
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
the `disable-fast-install' option into LT_INIT's first parameter.])
the 'disable-fast-install' option into LT_INIT's first parameter.])
])

dnl aclocal-1.4 backwards compatibility:
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])


# _LT_WITH_AIX_SONAME([DEFAULT])
# ----------------------------------
# implement the --with-aix-soname flag, and support the `aix-soname=aix'
# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
m4_define([_LT_WITH_AIX_SONAME],
[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
shared_archive_member_spec=
case $host,$enable_shared in
power*-*-aix[[5-9]]*,yes)
AC_MSG_CHECKING([which variant of shared library versioning to provide])
AC_ARG_WITH([aix-soname],
[AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
[shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
[case $withval in
aix|svr4|both)
;;
*)
AC_MSG_ERROR([Unknown argument to --with-aix-soname])
;;
esac
lt_cv_with_aix_soname=$with_aix_soname],
[AC_CACHE_VAL([lt_cv_with_aix_soname],
[lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
with_aix_soname=$lt_cv_with_aix_soname])
AC_MSG_RESULT([$with_aix_soname])
if test aix != "$with_aix_soname"; then
# For the AIX way of multilib, we name the shared archive member
# based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
# and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
# Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
# the AIX toolchain works better with OBJECT_MODE set (default 32).
if test 64 = "${OBJECT_MODE-32}"; then
shared_archive_member_spec=shr_64
else
shared_archive_member_spec=shr
fi
fi
;;
*)
with_aix_soname=aix
;;
esac
_LT_DECL([], [shared_archive_member_spec], [0],
[Shared archive member basename, for filename based shared library versioning on AIX])dnl
])# _LT_WITH_AIX_SONAME

LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])


# _LT_WITH_PIC([MODE])
# --------------------
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
# LT_INIT options.
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
m4_define([_LT_WITH_PIC],
[AC_ARG_WITH([pic],
[AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
@@ -334,19 +389,17 @@ m4_define([_LT_WITH_PIC],
*)
pic_mode=default
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for lt_pkg in $withval; do
IFS="$lt_save_ifs"
IFS=$lt_save_ifs
if test "X$lt_pkg" = "X$lt_p"; then
pic_mode=yes
fi
done
IFS="$lt_save_ifs"
IFS=$lt_save_ifs
;;
esac],
[pic_mode=default])
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
[pic_mode=m4_default([$1], [default])])
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
])# _LT_WITH_PIC
@@ -359,7 +412,7 @@ AU_DEFUN([AC_LIBTOOL_PICMODE],
[_LT_SET_OPTION([LT_INIT], [pic-only])
AC_DIAGNOSE([obsolete],
[$0: Remove this warning and the call to _LT_SET_OPTION when you
put the `pic-only' option into LT_INIT's first parameter.])
put the 'pic-only' option into LT_INIT's first parameter.])
])

dnl aclocal-1.4 backwards compatibility:
@@ -1,6 +1,7 @@
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
#
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
# Foundation, Inc.
# Written by Gary V. Vaughan, 2004
#
# This file is free software; the Free Software Foundation gives
@@ -33,7 +34,7 @@ m4_define([_lt_join],
# ------------
# Manipulate m4 lists.
# These macros are necessary as long as will still need to support
# Autoconf-2.59 which quotes differently.
# Autoconf-2.59, which quotes differently.
m4_define([lt_car], [[$1]])
m4_define([lt_cdr],
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
@@ -44,7 +45,7 @@ m4_define([lt_unquote], $1)

# lt_append(MACRO-NAME, STRING, [SEPARATOR])
# ------------------------------------------
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
# Note that neither SEPARATOR nor STRING are expanded; they are appended
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
@@ -1,6 +1,6 @@
# ltversion.m4 -- version numbers -*- Autoconf -*-
#
# Copyright (C) 2004 Free Software Foundation, Inc.
# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
# Written by Scott James Remnant, 2004
#
# This file is free software; the Free Software Foundation gives
@@ -9,15 +9,15 @@

# @configure_input@

# serial 3337 ltversion.m4
# serial 4171 ltversion.m4
# This file is part of GNU Libtool

m4_define([LT_PACKAGE_VERSION], [2.4.2])
m4_define([LT_PACKAGE_REVISION], [1.3337])
m4_define([LT_PACKAGE_VERSION], [2.4.5])
m4_define([LT_PACKAGE_REVISION], [2.4.5])

AC_DEFUN([LTVERSION_VERSION],
[macro_version='2.4.2'
macro_revision='1.3337'
[macro_version='2.4.5'
macro_revision='2.4.5'
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
_LT_DECL(, macro_revision, 0)
])
@@ -1,6 +1,7 @@
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
#
# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
# Foundation, Inc.
# Written by Scott James Remnant, 2004.
#
# This file is free software; the Free Software Foundation gives
@@ -11,7 +12,7 @@

# These exist entirely to fool aclocal when bootstrapping libtool.
#
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
# which have later been changed to m4_define as they aren't part of the
# exported API, or moved to Autoconf or Automake where they belong.
#
@@ -25,7 +26,7 @@
# included after everything else. This provides aclocal with the
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
# because those macros already exist, or will be overwritten later.
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
#
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
# Yes, that means every name once taken will need to remain here until
@@ -3,7 +3,7 @@

scriptversion=2013-10-28.13; # UTC

# Copyright (C) 1996-2013 Free Software Foundation, Inc.
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.

# This program is free software; you can redistribute it and/or modify
@@ -1,6 +1,6 @@
AUTOMAKE_OPTIONS = foreign
MODULE_FLAGS = -module -avoid-version
SUBDIRS = core
SUBDIRS = core extra

AM_CPPFLAGS = -I$(top_srcdir)/include
modulesdir = $(pkglibdir)/modules/autoload
@@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
@SET_MAKE@

VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
@@ -79,27 +89,27 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = modules
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \
$(top_srcdir)/m4/argz.m4 \
$(top_srcdir)/m4/ax_append_compile_flags.m4 \
$(top_srcdir)/m4/ax_append_flag.m4 \
$(top_srcdir)/m4/ax_arg_enable_assert.m4 \
$(top_srcdir)/m4/ax_arg_enable_debugging.m4 \
$(top_srcdir)/m4/ax_arg_enable_warnings.m4 \
$(top_srcdir)/m4/ax_arg_ioloop_mechanism.m4 \
$(top_srcdir)/m4/ax_arg_libgeoip.m4 \
$(top_srcdir)/m4/ax_arg_openssl.m4 \
$(top_srcdir)/m4/ax_check_compile_flag.m4 \
$(top_srcdir)/m4/ax_library_net.m4 \
$(top_srcdir)/m4/ax_require_defined.m4 \
$(top_srcdir)/m4/gcc_stack_protect.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltdl.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/configure.ac
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltargz.m4 \
$(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
@@ -657,6 +667,7 @@ am__define_uniq_tagged_files = \
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
@@ -687,7 +698,6 @@ ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
ARGZ_H = @ARGZ_H@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@@ -738,9 +748,11 @@ LTDLDEPS = @LTDLDEPS@
LTDLINCL = @LTDLINCL@
LTDLOPEN = @LTDLOPEN@
LTLIBOBJS = @LTLIBOBJS@
LT_ARGZ_H = @LT_ARGZ_H@
LT_CONFIG_H = @LT_CONFIG_H@
LT_DLLOADERS = @LT_DLLOADERS@
LT_DLPREOPEN = @LT_DLPREOPEN@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -826,7 +838,7 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign
MODULE_FLAGS = -module -avoid-version
SUBDIRS = core
SUBDIRS = core extra
AM_CPPFLAGS = -I$(top_srcdir)/include
modulesdir = $(pkglibdir)/modules/autoload
modules_LTLIBRARIES = m_accept.la \
@@ -1038,7 +1050,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign modules/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign modules/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -1666,6 +1677,8 @@ uninstall-am: uninstall-modulesLTLIBRARIES
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
uninstall-am uninstall-modulesLTLIBRARIES

.PRECIOUS: Makefile


modules: $(modules_LTLIBRARIES)

@@ -54,11 +54,3 @@ modules_LTLIBRARIES = m_bmask.la \
m_tmode.la

modules: $(modules_LTLIBRARIES)

install-exec-hook:
if test -d $(DESTDIR)$(pkglibdir)-old; then \
rm -rf $(DESTDIR)$(pkglibdir)-old; \
fi
if test -d $(DESTDIR)$(pkglibdir); then \
mv $(DESTDIR)$(pkglibdir) $(DESTDIR)$(pkglibdir)-old; \
fi
@@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.14.1 from Makefile.am.
# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2013 Free Software Foundation, Inc.
# Copyright (C) 1994-2014 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,17 @@
@SET_MAKE@

VPATH = @srcdir@
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
@@ -79,27 +89,27 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = modules/core
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/depcomp
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \
$(top_srcdir)/m4/argz.m4 \
$(top_srcdir)/m4/ax_append_compile_flags.m4 \
$(top_srcdir)/m4/ax_append_flag.m4 \
$(top_srcdir)/m4/ax_arg_enable_assert.m4 \
$(top_srcdir)/m4/ax_arg_enable_debugging.m4 \
$(top_srcdir)/m4/ax_arg_enable_warnings.m4 \
$(top_srcdir)/m4/ax_arg_ioloop_mechanism.m4 \
$(top_srcdir)/m4/ax_arg_libgeoip.m4 \
$(top_srcdir)/m4/ax_arg_openssl.m4 \
$(top_srcdir)/m4/ax_check_compile_flag.m4 \
$(top_srcdir)/m4/ax_library_net.m4 \
$(top_srcdir)/m4/ax_require_defined.m4 \
$(top_srcdir)/m4/gcc_stack_protect.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltdl.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/configure.ac
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltargz.m4 \
$(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
@@ -299,12 +309,12 @@ am__define_uniq_tagged_files = \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
ARGZ_H = @ARGZ_H@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@@ -355,9 +365,11 @@ LTDLDEPS = @LTDLDEPS@
LTDLINCL = @LTDLINCL@
LTDLOPEN = @LTDLOPEN@
LTLIBOBJS = @LTLIBOBJS@
LT_ARGZ_H = @LT_ARGZ_H@
LT_CONFIG_H = @LT_CONFIG_H@
LT_DLLOADERS = @LT_DLLOADERS@
LT_DLPREOPEN = @LT_DLPREOPEN@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -507,7 +519,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign modules/core/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign modules/core/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -807,8 +818,7 @@ install-dvi: install-dvi-am
install-dvi-am:

install-exec-am:
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook

install-html: install-html-am

install-html-am:
@@ -849,34 +859,27 @@ ps-am:

uninstall-am: uninstall-modulesLTLIBRARIES

.MAKE: install-am install-exec-am install-strip
.MAKE: install-am install-strip

.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
clean-libtool clean-modulesLTLIBRARIES cscopelist-am ctags \
ctags-am distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-exec-hook install-html install-html-am \
install-info install-info-am install-man \
install-modulesLTLIBRARIES install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-modulesLTLIBRARIES \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
uninstall-modulesLTLIBRARIES

.PRECIOUS: Makefile

modules: $(modules_LTLIBRARIES)

install-exec-hook:
if test -d $(DESTDIR)$(pkglibdir)-old; then \
rm -rf $(DESTDIR)$(pkglibdir)-old; \
fi
if test -d $(DESTDIR)$(pkglibdir); then \
mv $(DESTDIR)$(pkglibdir) $(DESTDIR)$(pkglibdir)-old; \
fi
modules: $(modules_LTLIBRARIES)

# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
@@ -1,7 +1,7 @@
/*
* ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
*
* Copyright (c) 1997-2014 ircd-hybrid development team
* Copyright (c) 1997-2015 ircd-hybrid development team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -32,14 +32,10 @@
#include "hash.h"
#include "irc_string.h"
#include "ircd.h"
#include "numeric.h"
#include "user.h"
#include "conf.h"
#include "server.h"
#include "send.h"
#include "parse.h"
#include "modules.h"
#include "packet.h"


/*! \brief BMASK command handler
@@ -72,7 +68,7 @@ ms_bmask(struct Client *source_p, int parc, char *parv[])
return 0;

/* TS is higher, drop it. */
if (atol(parv[1]) > chptr->channelts)
if (atol(parv[1]) > chptr->creationtime)
return 0;

switch (*parv[3])
@@ -117,7 +113,7 @@ ms_bmask(struct Client *source_p, int parc, char *parv[])
{
*mbuf = *(pbuf - 1) = '\0';

sendto_channel_local(ALL_MEMBERS, 0, chptr, "%s %s", modebuf, parabuf);
sendto_channel_local(0, chptr, "%s %s", modebuf, parabuf);
mbuf = modebuf + mlen;
pbuf = parabuf;
modecount = 0;
@@ -134,11 +130,11 @@ ms_bmask(struct Client *source_p, int parc, char *parv[])
if (modecount)
{
*mbuf = *(pbuf - 1) = '\0';
sendto_channel_local(ALL_MEMBERS, 0, chptr, "%s %s", modebuf, parabuf);
sendto_channel_local(0, chptr, "%s %s", modebuf, parabuf);
}

sendto_server(source_p, NOCAPS, NOCAPS, ":%s BMASK %lu %s %s :%s",
source_p->id, (unsigned long)chptr->channelts, chptr->name,
sendto_server(source_p, 0, 0, ":%s BMASK %lu %s %s :%s",
source_p->id, (unsigned long)chptr->creationtime, chptr->name,
parv[3], parv[4]);
return 0;
}
@@ -1,7 +1,7 @@
/*
* ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
*
* Copyright (c) 1997-2014 ircd-hybrid development team
* Copyright (c) 1997-2015 ircd-hybrid development team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -33,7 +33,6 @@
#include "parse.h"
#include "modules.h"
#include "restart.h"
#include "conf.h"


/*! \brief DIE command handler
@@ -51,20 +50,21 @@ static int
mo_die(struct Client *source_p, int parc, char *parv[])
{
char buf[IRCD_BUFSIZE] = "";
const char *const name = parv[1];

if (!HasOFlag(source_p, OPER_FLAG_DIE))
{
sendto_one_numeric(source_p, &me, ERR_NOPRIVS, "die");
return 0;
}

if (parc < 2 || EmptyString(parv[1]))
if (EmptyString(name))
{
sendto_one_notice(source_p, &me, ":Need server name /die %s", me.name);
return 0;
}

if (irccmp(parv[1], me.name))
if (irccmp(name, me.name))
{
sendto_one_notice(source_p, &me, ":Mismatch on /die %s", me.name);
return 0;
@@ -1,7 +1,7 @@
/*
* ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
*
* Copyright (c) 1997-2014 ircd-hybrid development team
* Copyright (c) 1997-2015 ircd-hybrid development team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -1,7 +1,7 @@
/*
* ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
*
* Copyright (c) 1997-2014 ircd-hybrid development team
* Copyright (c) 1997-2015 ircd-hybrid development team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -131,7 +131,7 @@ ms_join(struct Client *source_p, int parc, char *parv[])
}

newts = atol(parv[1]);
oldts = chptr->channelts;
oldts = chptr->creationtime;
oldmode = &chptr->mode;

if (ConfigGeneral.ignore_bogus_ts)
@@ -150,7 +150,7 @@ ms_join(struct Client *source_p, int parc, char *parv[])
{
if (!newts && !isnew && oldts)
{
sendto_channel_local(ALL_MEMBERS, 0, chptr,
sendto_channel_local(0, chptr,
":%s NOTICE %s :*** Notice -- TS for %s changed from %lu to 0",
me.name, chptr->name, chptr->name, (unsigned long)oldts);
sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE,
@@ -160,15 +160,15 @@ ms_join(struct Client *source_p, int parc, char *parv[])
}

if (isnew)
chptr->channelts = newts;
chptr->creationtime = newts;
else if (newts == 0 || oldts == 0)
chptr->channelts = 0;
chptr->creationtime = 0;
else if (newts == oldts)
;
else if (newts < oldts)
{
keep_our_modes = 0;
chptr->channelts = newts;
chptr->creationtime = newts;
}
else
keep_new_modes = 0;
@@ -196,13 +196,13 @@ ms_join(struct Client *source_p, int parc, char *parv[])
if (chptr->topic[0])
{
channel_set_topic(chptr, "", "", 0, 0);
sendto_channel_local(ALL_MEMBERS, 0, chptr, ":%s TOPIC %s :",
sendto_channel_local(0, chptr, ":%s TOPIC %s :",
(IsHidden(source_p) ||
ConfigServerHide.hide_servers) ?
me.name : source_p->name, chptr->name);
}

sendto_channel_local(ALL_MEMBERS, 0, chptr,
sendto_channel_local(0, chptr,
":%s NOTICE %s :*** Notice -- TS for %s changed from %lu to %lu",
me.name, chptr->name, chptr->name,
(unsigned long)oldts, (unsigned long)newts);
@@ -215,26 +215,32 @@ ms_join(struct Client *source_p, int parc, char *parv[])

/* This _SHOULD_ be to ALL_MEMBERS
* It contains only +imnpstlk, etc */
sendto_channel_local(ALL_MEMBERS, 0, chptr, ":%s MODE %s %s %s",
sendto_channel_local(0, chptr, ":%s MODE %s %s %s",
servername, chptr->name, modebuf, parabuf);
}

if (!IsMember(source_p, chptr))
{
add_user_to_channel(chptr, source_p, 0, 1);
sendto_channel_local(ALL_MEMBERS, 0, chptr, ":%s!%s@%s JOIN :%s",
source_p->name, source_p->username,
source_p->host, chptr->name);

sendto_channel_local_butone(NULL, CAP_EXTENDED_JOIN, 0, chptr, ":%s!%s@%s JOIN %s %s :%s",
source_p->name, source_p->username,
source_p->host, chptr->name,
(!IsDigit(source_p->account[0]) && source_p->account[0] != '*') ? source_p->account : "*",
source_p->info);
sendto_channel_local_butone(NULL, 0, CAP_EXTENDED_JOIN, chptr, ":%s!%s@%s JOIN :%s",
source_p->name, source_p->username,
source_p->host, chptr->name);

if (source_p->away[0])
sendto_channel_local_butone(source_p, 0, CAP_AWAY_NOTIFY, chptr,
sendto_channel_local_butone(source_p, CAP_AWAY_NOTIFY, 0, chptr,
":%s!%s@%s AWAY :%s",
source_p->name, source_p->username,
source_p->host, source_p->away);
}

sendto_server(source_p, NOCAPS, NOCAPS, ":%s JOIN %lu %s +",
source_p->id, (unsigned long)chptr->channelts, chptr->name);
sendto_server(source_p, 0, 0, ":%s JOIN %lu %s +",
source_p->id, (unsigned long)chptr->creationtime, chptr->name);
return 0;
}

@@ -256,8 +262,7 @@ set_final_mode(const struct Mode *mode, const struct Mode *oldmode)

for (const struct mode_letter *tab = chan_modes; tab->letter; ++tab)
{
if ((tab->mode & mode->mode) &&
!(tab->mode & oldmode->mode))
if ((tab->mode & mode->mode) && !(tab->mode & oldmode->mode))
{
if (what != 1)
{
@@ -271,8 +276,7 @@ set_final_mode(const struct Mode *mode, const struct Mode *oldmode)

for (const struct mode_letter *tab = chan_modes; tab->letter; ++tab)
{
if ((tab->mode & oldmode->mode) &&
!(tab->mode & mode->mode))
if ((tab->mode & oldmode->mode) && !(tab->mode & mode->mode))
{
if (what != -1)
{
@@ -295,7 +299,7 @@ set_final_mode(const struct Mode *mode, const struct Mode *oldmode)
*mbuf++ = 'l';
}

if (oldmode->key[0] && !mode->key[0])
if (oldmode->key[0] && mode->key[0] == '\0')
{
if (what != -1)
{
@@ -362,7 +366,7 @@ remove_our_modes(struct Channel *chptr, struct Client *source_p)
static void
remove_a_mode(struct Channel *chptr, struct Client *source_p, int mask, const char flag)
{
dlink_node *ptr = NULL;
dlink_node *node = NULL;
char lmodebuf[MODEBUFLEN];
const char *lpara[MAXMODEPARAMS];
int count = 0, lcount = 0;
@@ -375,16 +379,16 @@ remove_a_mode(struct Channel *chptr, struct Client *source_p, int mask, const ch

sendbuf[0] = '\0';

DLINK_FOREACH(ptr, chptr->members.head)
DLINK_FOREACH(node, chptr->members.head)
{
struct Membership *ms = ptr->data;
struct Membership *member = node->data;

if ((ms->flags & mask) == 0)
if ((member->flags & mask) == 0)
continue;

ms->flags &= ~mask;
member->flags &= ~mask;

lpara[count++] = ms->client_p->name;
lpara[count++] = member->client_p->name;

*mbuf++ = flag;

@@ -401,7 +405,7 @@ remove_a_mode(struct Channel *chptr, struct Client *source_p, int mask, const ch
}

*mbuf = '\0';
sendto_channel_local(ALL_MEMBERS, 0, chptr, ":%s MODE %s %s%s",
sendto_channel_local(0, chptr, ":%s MODE %s %s%s",
(IsHidden(source_p) ||
ConfigServerHide.hide_servers) ?
me.name : source_p->name,
@@ -426,7 +430,7 @@ remove_a_mode(struct Channel *chptr, struct Client *source_p, int mask, const ch
strlcat(sendbuf, lpara[lcount], sizeof(sendbuf));
}

sendto_channel_local(ALL_MEMBERS, 0, chptr, ":%s MODE %s %s%s",
sendto_channel_local(0, chptr, ":%s MODE %s %s%s",
(IsHidden(source_p) || ConfigServerHide.hide_servers) ?
me.name : source_p->name, chptr->name, lmodebuf, sendbuf);
}