"Fossies" - the Fresh Open Source Software Archive

Member "libmcrypt-2.5.8/lib/mcrypt_threads.c" (8 Jan 2003, 1492 Bytes) of package /linux/privat/old/libmcrypt-2.5.8.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "mcrypt_threads.c" see the Fossies "Dox" file reference documentation.

    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 #ifdef DLMUTEX
   26 
   27 static void _mcrypt_mutex_seterror (const char *ERROR) {
   28  return; /* do nothing */
   29 }
   30 static const char * _mcrypt_mutex_geterror (void) {
   31  /* return no error */
   32  return NULL;
   33 }
   34 
   35 WIN32DLL_DEFINE
   36 int mcrypt_mutex_register ( void (*mutex_lock)(void) , 
   37             void (*mutex_unlock)(void)) 
   38 {
   39 
   40     return lt_dlmutex_register ( mutex_lock, mutex_unlock,
   41         _mcrypt_mutex_seterror, _mcrypt_mutex_geterror);
   42 
   43 }
   44 #else
   45 WIN32DLL_DEFINE
   46 int mcrypt_mutex_register ( void (*mutex_lock)(void) ,
   47                         void (*mutex_unlock)(void))   
   48                         {
   49                         return 0;
   50 }
   51 #endif /* NO_DLMUTEX */