34 |
#include <signal.h> |
#include <signal.h> |
35 |
#include <pthread.h> |
#include <pthread.h> |
36 |
#include <stdarg.h> |
#include <stdarg.h> |
37 |
|
#include <stdlib.h> |
38 |
|
|
39 |
#include "ssl.h" |
#include "ssl.h" |
40 |
|
|
69 |
#define MAXIMUM(x,y) ((x) > (y) ? (x) : (y)) |
#define MAXIMUM(x,y) ((x) > (y) ? (x) : (y)) |
70 |
#define is(a,b) ((a&&b)?!strcasecmp(a, b):0) |
#define is(a,b) ((a&&b)?!strcasecmp(a, b):0) |
71 |
|
|
72 |
|
|
73 |
/** Replace the standard signal function with a more reliable using sigaction.*/ |
/** Replace the standard signal function with a more reliable using sigaction.*/ |
74 |
typedef void Sigfunc(int); |
typedef void Sigfunc(int); |
75 |
Sigfunc *signal(int signo, Sigfunc * func); |
Sigfunc *signal(int signo, Sigfunc * func); |
88 |
|
|
89 |
#define NEW(p) (xcalloc(1, (long)sizeof *(p))) |
#define NEW(p) (xcalloc(1, (long)sizeof *(p))) |
90 |
|
|
91 |
|
/** ------------------------------------------ Simple Assert Exception macro */ |
92 |
|
|
93 |
|
#define ASSERT(e) if(e) { error("AssertException: at %s:%d\naborting..\n", \ |
94 |
|
__FILE__, __LINE__); abort(); } |
95 |
|
|
96 |
|
/* --------------------------------------------------------- Data structures */ |
97 |
|
|
98 |
/** Defines data for application runtime */ |
/** Defines data for application runtime */ |
99 |
struct myrun { |
struct myrun { |