-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmp_system.h
131 lines (117 loc) · 4.13 KB
/
mp_system.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
/******************************************************************************/
/* */
/* mp_system.h */
/* */
/* The Matching Pursuit ToolKit */
/* */
/* Rémi Gribonval */
/* Sacha Krstulovic Mon Feb 21 2005 */
/* -------------------------------------------------------------------------- */
/* */
/* Copyright (C) 2005 IRISA */
/* */
/* This program is free software; you can redistribute it and/or */
/* modify it under the terms of the GNU General Public License */
/* as published by the Free Software Foundation; either version 2 */
/* of the License, or (at your option) any later version. */
/* */
/* 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., 59 Temple Place - Suite 330, */
/* Boston, MA 02111-1307, USA. */
/* */
/******************************************************************************/
/*
* SVN log:
*
* $Author: sacha $
* $Date: 2006-01-31 14:51:06 +0100 (Tue, 31 Jan 2006) $
* $Revision: 300 $
*
*/
/*****************************************/
/* */
/* SYSTEM DEPENDENT INCLUDES AND DEFINES */
/* */
/*****************************************/
#ifndef _mp_system_h_
# define _mp_system_h_
# ifdef HAVE_CONFIG_H
# include <config.h>
# endif
# include <stdio.h>
# include <time.h>
/* stdlib stuff */
# if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
# include <stdarg.h>
# else
# if HAVE_STDLIB_H
# include <stdlib.h>
# endif
# endif
# if defined STDC_HEADERS || defined _LIBC
# include <stdlib.h>
# elif defined HAVE_MALLOC_H
# include <malloc.h>
# endif
/* string stuff */
# if HAVE_STRING_H
# if !STDC_HEADERS && HAVE_MEMORY_H
# include <memory.h>
# endif
# include <string.h>
# endif
/* mathematics */
# if HAVE_MATH_H
# include <math.h>
# endif
/* signals */
/* # if HAVE_SIGNAL_H */
# include <signal.h>
/* # endif */
/* limits */
# if HAVE_LIMITS_H
# include <limits.h>
# else
/* If limits.h does not exist, define our own limits: */
# ifndef INT_MAX
# define INT_MAX 2147483647
# endif
# ifndef UINT_MAX
# define UINT_MAX 4294967295U
# endif
# if __WORDSIZE == 64
# define ULONG_MAX 18446744073709551615UL
# else
# define ULONG_MAX 4294967295UL
# endif
# endif
# if HAVE_SYS_TYPES_H
# include <sys/types.h>
# endif
/* Assertions */
# ifdef HAVE_ASSERT_H
# include <assert.h>
# else
# define assert(expr) (void)(0)
# endif
#ifdef _WIN32
#if defined(_MSC_VER)
#define MPTK_LIB_EXPORT __declspec(dllexport) /* export function out of the lib */
#define MPTK_LIB_IMPORT __declspec(dllimport) /* import function in the lib */
#else
#define MPTK_LIB_EXPORT
#define MPTK_LIB_IMPORT
#endif
#else
#define MPTK_LIB_EXPORT
#define MPTK_LIB_IMPORT
#endif
#endif /* _mp_system_h_ */