win32/compat/ltdl.h
b3722aeb
 /*
77c98d59
  *  Copyright (C) 2013-2020 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
52cddcbc
  *  Copyright (C) 2009-2013 Sourcefire, Inc.
b3722aeb
  *
  *  Authors: aCaB <acab@clamav.net>
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License version 2 as
  *  published by the Free Software Foundation.
  *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  *  MA 02110-1301, USA.
  */
 
 #ifndef __LTDL_H
 #define __LTDL_H
 
 #if HAVE_CONFIG_H
 #include "clamav-config.h"
 #endif
 
 typedef HANDLE lt_dlhandle;
 
 int lt_dlinit(void);
 lt_dlhandle lt_dlopen(const char *filename);
 void *lt_dlsym(lt_dlhandle handle, const char *name);
 const char *lt_dlerror(void);
72fd33c8
 int lt_dlclose(lt_dlhandle handle);
b3722aeb
 int lt_dladdsearchdir(const char *search_dir);
 const char *lt_dlgetsearchpath(void);
 
72fd33c8
 typedef struct {
     char *filename;                /* file name */
     char *name;                    /* module name */
     int ref_count;                 /* number of times lt_dlopened minus
b3722aeb
 				   number of times lt_dlclosed. */
72fd33c8
     unsigned int is_resident : 1;  /* module can't be unloaded. */
     unsigned int is_symglobal : 1; /* module symbols can satisfy
b3722aeb
 				   subsequently loaded modules.  */
72fd33c8
     unsigned int is_symlocal : 1;  /* module symbols are only available
b3722aeb
 				   locally. */
 } lt_dlinfo;
 const lt_dlinfo *lt_dlgetinfo(lt_dlhandle handle);
 
 #endif /* __LTDL_H */