~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to server-tools/instance-manager/portability.h

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (C) 2005-2006 MySQL AB
 
2
 
 
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.
 
6
 
 
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.
 
11
 
 
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 */
 
15
 
 
16
#ifndef INCLUDES_MYSQL_INSTANCE_MANAGER_PORTABILITY_H
 
17
#define INCLUDES_MYSQL_INSTANCE_MANAGER_PORTABILITY_H
 
18
 
 
19
#if (defined(_SCO_DS) || defined(UNIXWARE_7)) && !defined(SHUT_RDWR)
 
20
/*
 
21
   SHUT_* functions are defined only if
 
22
   "(defined(_XOPEN_SOURCE) && _XOPEN_SOURCE_EXTENDED - 0 >= 1)"
 
23
*/
 
24
#define SHUT_RDWR 2
 
25
#endif
 
26
 
 
27
#ifdef __WIN__
 
28
 
 
29
#define vsnprintf _vsnprintf
 
30
#define snprintf _snprintf
 
31
 
 
32
#define SIGKILL 9
 
33
 
 
34
/*TODO:  fix this */
 
35
#define PROTOCOL_VERSION 10
 
36
 
 
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"
 
42
 
 
43
typedef int pid_t;
 
44
 
 
45
#undef popen
 
46
#define popen(A,B) _popen(A,B)
 
47
 
 
48
#define NEWLINE "\r\n"
 
49
#define NEWLINE_LEN 2
 
50
 
 
51
const char CR = '\r';
 
52
const char LF = '\n';
 
53
 
 
54
#else /* ! __WIN__ */
 
55
 
 
56
#define NEWLINE "\n"
 
57
#define NEWLINE_LEN 1
 
58
 
 
59
const char LF = '\n';
 
60
 
 
61
#endif /* __WIN__ */
 
62
 
 
63
#endif  /* INCLUDES_MYSQL_INSTANCE_MANAGER_PORTABILITY_H */
 
64
 
 
65