/[mcrypt]/libmcrypt/lib/mcrypt_threads.c
ViewVC logotype

Annotation of /libmcrypt/lib/mcrypt_threads.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations)
Sat Jun 9 10:12:55 2001 UTC (22 years, 9 months ago) by nmav
Branch: MAIN
CVS Tags: libmcrypt_2_4_15, libmcrypt_2_4_16, libmcrypt_2_4_16b
Changes since 1.3: +8 -0 lines
File MIME type: text/plain
added check for lt_dlmutex_register in the installed version of libltdl.
If it is not found then that capability is disabled.

1 nmav 1.1 /*
2     * Copyright (C) 2001 Nikos Mavroyanopoulos
3     *
4     * This library is free software; you can redistribute it and/or modify it
5     * under the terms of the GNU Library General Public License as published
6     * by the Free Software Foundation; either version 2 of the License, or
7     * (at your option) any later version.
8     *
9     * This library is distributed in the hope that it will be useful,
10     * but WITHOUT ANY WARRANTY; without even the implied warranty of
11     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12     * Library General Public License for more details.
13     *
14     * You should have received a copy of the GNU Library General Public
15     * License along with this library; if not, write to the
16     * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17     * Boston, MA 02111-1307, USA.
18     */
19    
20     #ifndef LIBDEFS_H
21     #define LIBDEFS_H
22     #include <libdefs.h>
23     #endif
24    
25 nmav 1.3 #ifdef USE_LTDL
26 nmav 1.2 static void _mcrypt_mutex_seterror (const char *ERROR) {
27     return; /* do nothing */
28     }
29     static const char * _mcrypt_mutex_geterror (void) {
30     /* return no error */
31     return NULL;
32     }
33 nmav 1.1
34 nmav 1.4 # ifndef NO_DLMUTEX
35 nmav 1.1 int mcrypt_mutex_register ( void (*mutex_lock)(void) ,
36 nmav 1.2 void (*mutex_unlock)(void))
37 nmav 1.1 {
38    
39     return lt_dlmutex_register ( mutex_lock, mutex_unlock,
40 nmav 1.2 _mcrypt_mutex_seterror, _mcrypt_mutex_geterror);
41    
42 nmav 1.1 }
43 nmav 1.4 # else
44     int mcrypt_mutex_register ( void (*mutex_lock)(void) ,
45     void (*mutex_unlock)(void))
46     {
47     return 0;
48     }
49     # endif /* NO_DLMUTEX */
50 nmav 1.3 #endif

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26