Bayonne2 / Common C++ 2 Framework
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
missing.h
Go to the documentation of this file.
1 // Copyright (C) 1999-2005 Open Source Telecom Corporation.
2 // Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
3 //
4 // This program is free software; you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation; either version 2 of the License, or
7 // (at your option) any later version.
8 //
9 // This program 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
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 //
18 // As a special exception, you may use this file as part of a free software
19 // library without restriction. Specifically, if other files instantiate
20 // templates or use macros or inline functions from this file, or you compile
21 // this file and link it with other files to produce an executable, this
22 // file does not by itself cause the resulting executable to be covered by
23 // the GNU General Public License. This exception does not however
24 // invalidate any other reasons why the executable file might be covered by
25 // the GNU General Public License.
26 //
27 // This exception applies only to the code released under the name GNU
28 // Common C++. If you copy code from other releases into a copy of GNU
29 // Common C++, as the General Public License permits, the exception does
30 // not apply to the code that you add in this way. To avoid misleading
31 // anyone as to the status of such modified files, you must delete
32 // this exception notice from them.
33 //
34 // If you write modifications of your own for GNU Common C++, it is your choice
35 // whether to permit this exception to apply to your modifications.
36 // If you do not wish that, delete this exception notice.
37 //
38 
44 #ifndef CCXX_MISSING_H_
45 #define CCXX_MISSING_H_
46 
47 #ifndef CCXX_CONFIG_H_
48 #include <cc++/config.h>
49 #endif
50 
51 #ifndef CCXX_STRCHAR_H_
52 #include <cc++/strchar.h>
53 #endif
54 
55 #include <ctime>
56 
57 #ifdef MACOSX
58 #undef HAVE_LOCKF
59 #endif
60 
61 #ifdef WIN32
62 #ifndef HAVE_LOCKF
63 #define HAVE_LOCKF
64 #endif
65 #endif
66 
67 #include <fstream>
68 #include <iostream>
69 #include <ctime>
70 
71 #ifdef HAVE_SSTREAM
72 #include <sstream>
73 #else
74 #include <strstream>
75 #endif
76 
77 #if defined(__KCC)
78 #define ostream ostream_withassign
79 #endif
80 
81 #ifdef __BORLANDC__
82 #include <time.h>
83 #endif
84 
85 #ifdef CCXX_NAMESPACES
86 namespace ost {
87 #endif
88 
89 #ifndef HAVE_GETTIMEOFDAY
90 #ifdef WIN32
91 #define HAVE_GETTIMEOFDAY
92 __EXPORT int gettimeofday(struct timeval *tv_, void *tz_);
93 #endif
94 #endif
95 
96 #ifdef HAVE_GETTIMEOFDAY
97 #ifdef WIN32
98 __EXPORT DWORD getTicks(void);
99 #else
100 __EXPORT unsigned long getTicks(void);
101 #endif
102 #endif
103 
104 #ifndef HAVE_MEMMOVE
105 __EXPORT void *memmove(char *dest, const char *source, size_t length);
106 #endif
107 
108 #ifndef HAVE_STRDUP
109 __EXPORT char *strdup(const char *str);
110 #endif
111 
112 #ifndef HAVE_LOCKF
113 __EXPORT int lockf(int fd, int mode, long offset);
114 #endif
115 
116 #ifndef HAVE_STRTOK_R
117 
118 inline char *strtok_r(char *s, const char *d, char **x) \
119  {return strtok(s, d);};
120 
121 #endif
122 
123 #ifdef CCXX_NAMESPACES
124 }
125 #endif
126 
127 #endif
__EXPORT int lockf(int fd, int mode, long offset)
__EXPORT char * strdup(const char *str)
Common and portable character string related functions.
char * strtok_r(char *s, const char *d, char **x)
Definition: missing.h:118
__EXPORT void * memmove(char *dest, const char *source, size_t length)
#define __EXPORT
Definition: audio2.h:51