OpenMPI 0.1.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

OTF_Platform_unix.h
Go to the documentation of this file.
1 /*
2 This is part of the OTF library. Copyright by ZIH, TU Dresden 2005-2012.
3 Authors: Andreas Knuepfer, Holger Brunst, Ronny Brendel, Thomas Kriebitzsch
4 */
5
6 /**
7 * @file OTF_Platform_unix.h
8 *
9 * @brief Deals with platform dependend issues.
10 *
11 * \ingroup internal
12 */
13
14
15 #ifndef OTF_PLATFORM_UNIX_H
16 #define OTF_PLATFORM_UNIX_H
17
18 #ifdef HAVE_CONFIG_H
19 #include "config.h"
20 #endif
21
22
23 #include <stdarg.h>
24 #include <stdlib.h>
25
26
27 #include <limits.h>
28 #if defined(HAVE_SYS_PARAM_H) && HAVE_SYS_PARAM_H
29 # include <sys/param.h>
30 #endif
31 #if defined(PATH_MAX)
32 # define OTF_PATH_MAX (PATH_MAX + 1)
33 #elif defined(_POSIX_PATH_MAX)
34 # define OTF_PATH_MAX (_POSIX_PATH_MAX + 1)
35 #else
36 # define OTF_PATH_MAX 256
37 #endif
38
39 #if !(defined(HAVE_FSEEKO) && HAVE_FSEEKO)
40 # undef fseeko
41 # undef ftello
42 # define fseeko fseek
43 # define ftello ftell
44 #endif /* HAVE_FSEEKO */
45
46 #if !(defined(HAVE_ASPRINTF) && HAVE_ASPRINTF)
47 # undef asprintf
48 # define asprintf OTF_asprintf
49 #endif /* HAVE_ASPRINTF */
50
51 #if !(defined(HAVE_SNPRINTF) && HAVE_SNPRINTF)
52 # undef snprintf
53 # define snprintf OTF_snprintf
54 #endif /* HAVE_SNPRINTF */
55
56 #if !(defined(HAVE_VASPRINTF) && HAVE_VASPRINTF)
57 # undef vasprintf
58 # define vasprintf OTF_vasprintf
59 #endif /* HAVE_VASPRINTF */
60
61 #if !(defined(HAVE_VSNPRINTF) && HAVE_VSNPRINTF)
62 # undef vsnprintf
63 # define vsnprintf OTF_vsnprintf
64 #endif /* HAVE_VSNPRINTF */
65
66 #if !(defined(HAVE_STRDUP) && HAVE_STRDUP)
67 # undef strdup
68 # define strdup OTF_strdup
69 #endif /* HAVE_STRDUP */
70
71 #ifdef __cplusplus
72 extern "C" {
73 #endif /* __cplusplus */
74
75 int OTF_asprintf( char** ptr, const char* fmt, ... );
76 int OTF_snprintf( char* str, size_t size, const char* fmt, ... );
77 int OTF_vasprintf( char** ptr, const char* fmt, va_list ap );
78 int OTF_vsnprintf( char* str, size_t size, const char* fmt, va_list ap );
79 char* OTF_strdup( const char* s );
80
81 #ifdef __cplusplus
82 }
83 #endif /* __cplusplus */
84
85 #endif /* OTF_PLATFORM_UNIX_H */