mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / server-tools / instance-manager / portability.h
blob6a824d8a31a3624caa366f26f69b2d2ad5ac5a16
1 /* Copyright (c) 2005-2007 MySQL AB
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; version 2 of the License.
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
12 You should have received a copy of the GNU General Public License
13 along with this program; if not, write to the Free Software
14 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
16 #ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_PORTABILITY_H
17 #define INCLUDES_MYSQL_INSTANCE_MANAGER_PORTABILITY_H
19 #if (defined(_SCO_DS) || defined(UNIXWARE_7)) && !defined(SHUT_RDWR)
21 SHUT_* functions are defined only if
22 "(defined(_XOPEN_SOURCE) && _XOPEN_SOURCE_EXTENDED - 0 >= 1)"
24 #define SHUT_RDWR 2
25 #endif
27 #ifdef __WIN__
29 #define vsnprintf _vsnprintf
30 #define snprintf _snprintf
32 #define SIGKILL 9
34 /*TODO: fix this */
35 #define PROTOCOL_VERSION 10
37 #define DFLT_CONFIG_FILE_NAME "my.ini"
38 #define DFLT_MYSQLD_PATH "mysqld"
39 #define DFLT_PASSWD_FILE_EXT ".passwd"
40 #define DFLT_PID_FILE_EXT ".pid"
41 #define DFLT_SOCKET_FILE_EXT ".sock"
43 typedef int pid_t;
45 #undef popen
46 #define popen(A,B) _popen(A,B)
48 #define NEWLINE "\r\n"
49 #define NEWLINE_LEN 2
51 const char CR = '\r';
52 const char LF = '\n';
54 #else /* ! __WIN__ */
56 #define NEWLINE "\n"
57 #define NEWLINE_LEN 1
59 const char LF = '\n';
61 #endif /* __WIN__ */
63 #endif /* INCLUDES_MYSQL_INSTANCE_MANAGER_PORTABILITY_H */