2 * Copyright (C) 2000 Nikos Mavroyanopoulos
4 * This file is part of GNUTLS.
6 * GNUTLS is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * GNUTLS is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
21 #include "gnutls_int.h"
22 #include "gnutls_errors_int.h"
27 # define gnutls_assert() fprintf(stderr, "GNUTLS_ASSERT: %s:%d\n", __FILE__,__LINE__);
29 # define gnutls_assert()
31 # else /* __FILE__ defined */
32 # define gnutls_assert()
35 # define gnutls_assert()
38 int _gnutls_asn2err( int asn_err
);
39 const char* gnutls_strerror(int error
);
40 void gnutls_perror(int error
);
41 int gnutls_error_is_fatal( int error
);
44 void _gnutls_log( const char *fmt
, ...);
46 # ifdef HANDSHAKE_DEBUG
47 # define _gnutls_handshake_log _gnutls_log
49 # define _gnutls_handshake_log( ...)
53 # define _gnutls_io_log _gnutls_log
55 # define _gnutls_io_log( ...)
59 # define _gnutls_buffers_log _gnutls_log
61 # define _gnutls_buffers_log( ...)
65 # define _gnutls_hard_log _gnutls_log
67 # define _gnutls_hard_log( ...)
71 # define _gnutls_record_log _gnutls_log
73 # define _gnutls_record_log( ...)
77 # define _gnutls_read_log _gnutls_log
79 # define _gnutls_read_log( ...)
83 # define _gnutls_write_log _gnutls_log
85 # define _gnutls_write_log( ...)
89 # define _gnutls_x509_log _gnutls_log
91 # define _gnutls_x509_log( ...)
96 /* FIXME: These macros only work with C99 compliant compilers
98 # define _gnutls_log(...)
99 # define _gnutls_handshake_log( ...)
100 # define _gnutls_io_log( ...)
101 # define _gnutls_buffers_log( ...)
102 # define _gnutls_hard_log( ...)
103 # define _gnutls_record_log( ...)
104 # define _gnutls_read_log( ...)
105 # define _gnutls_write_log( ...)
106 # define _gnutls_x509_log( ...)