2N/A/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2N/A * Copyright 2006, 2008 by the Massachusetts Institute of Technology. 2N/A * All Rights Reserved. 2N/A * Export of this software from the United States of America may 2N/A * require a specific license from the United States Government. 2N/A * It is the responsibility of any person or organization contemplating 2N/A * export to obtain such a license before exporting. 2N/A * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and 2N/A * distribute this software and its documentation for any purpose and 2N/A * without fee is hereby granted, provided that the above copyright 2N/A * notice appear in all copies and that both that copyright notice and 2N/A * this permission notice appear in supporting documentation, and that 2N/A * the name of M.I.T. not be used in advertising or publicity pertaining 2N/A * to distribution of the software without specific, written prior 2N/A * permission. Furthermore if you modify this software you must label 2N/A * your software as modified software and not distribute it in such a 2N/A * fashion that it might be confused with the original M.I.T. software. 2N/A * M.I.T. makes no representations about the suitability of 2N/A * this software for any purpose. It is provided "as is" without express 2N/A * or implied warranty. 2N/A * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 2N/A/* Currently CoreFoundation only exists on the Mac so we just use 2N/A * pthreads directly to avoid creating empty function calls on other 2N/A * platforms. If a thread initializer ever gets created in the common 2N/A * plugin code, move this there */ 2N/A long d_ino;
/* inode (always 1 in WIN32) */ 2N/A long handle;
/* _findfirst/_findnext handle */ 2N/A char *
dir;
/* the dir we are reading */ 2N/A#
endif /* USE_CFBUNDLE */ 2N/A /* Lock around CoreFoundation calls since objects are refcounted 2N/A * and the refcounts are not thread-safe. Using pthreads directly 2N/A * because this code is Mac-specific */ 2N/A true,
/* absolute */ 2N/A /* override the path the caller passed in */ 2N/A /* unlock after CFRelease calls since they modify refcounts */ 2N/A#
endif /* USE_CFBUNDLE */ 2N/A e =
"unknown failure";
2N/A#
endif /* USE_DLOPEN */ 2N/A /* XXX Do we need to add a leading "_" to the symbol name on any 2N/A modern platforms? */ 2N/A const char *e =
dlerror ();
/* XXX copy and save away */ 2N/A e =
"unknown failure";
2N/A const char *e =
"unable to get dll symbol";
/* XXX copy and save away */ 2N/A /* Cast function pointers to avoid code duplication */ 2N/A/* autoconf docs suggest using this preference order */ 2N/A/* Takes a NULL-terminated list of directories. If filebases is NULL, filebases is ignored 2N/A * all plugins in the directories are loaded. If filebases is a NULL-terminated array of names, 2N/A * only plugins in the directories with those name (plus any platform extension) are loaded. */ 2N/A /* load plugins with names from filenames from each directory */ 2N/A /* load all plugins in each directory */ 2N/A /* Solaris Kerberos: Only open files with a .so extension */ 2N/A err = 0;
/* ran out of plugins -- do nothing */ 2N/A h =
NULL;
/* dirhandle->files takes ownership */ 2N/A /* Nothing special to be done per pointer. */ 2N/A /* XXX Do we need to add a leading "_" to the symbol name on any 2N/A modern platforms? */ 2N/A p =
calloc (
1,
sizeof (*p));
/* calloc initializes to NULL */ 2N/A p =
NULL;
/* ptrs takes ownership */ 2N/A /* Nothing special to be done per pointer. */ 2N/A /* XXX Do we need to add a leading "_" to the symbol name on any 2N/A modern platforms? */ 2N/A p =
calloc (
1,
sizeof (*p));
/* calloc initializes to NULL */ 2N/A p =
NULL;
/* ptrs takes ownership */