~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libmysql/libmysql.c

MergedĀ fromĀ trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
#ifdef   HAVE_PWD_H
35
35
#include <pwd.h>
36
36
#endif
37
 
#if !defined(MSDOS) && !defined(__WIN__)
 
37
 
38
38
#include <sys/socket.h>
39
39
#include <netinet/in.h>
40
40
#include <arpa/inet.h>
45
45
#ifdef HAVE_SYS_SELECT_H
46
46
#include <sys/select.h>
47
47
#endif
48
 
#endif /* !defined(MSDOS) && !defined(__WIN__) */
 
48
 
49
49
#ifdef HAVE_POLL
50
50
#include <sys/poll.h>
51
51
#endif
66
66
ulong           net_buffer_length=8192;
67
67
ulong           max_allowed_packet= 1024L*1024L*1024L;
68
68
 
69
 
 
70
 
#ifdef EMBEDDED_LIBRARY
71
 
#undef net_flush
72
 
my_bool net_flush(NET *net);
73
 
#endif
74
 
 
75
 
#if defined(MSDOS) || defined(__WIN__)
76
 
/* socket_errno is defined in my_global.h for all platforms */
77
 
#define perror(A)
78
 
#else
79
69
#include <errno.h>
80
70
#define SOCKET_ERROR -1
81
 
#endif /* __WIN__ */
82
71
 
83
72
/*
84
73
  If allowed through some configuration, then this needs to
126
115
    if (!mysql_port)
127
116
    {
128
117
      mysql_port = MYSQL_PORT;
129
 
#ifndef MSDOS
130
118
      {
131
119
        struct servent *serv_ptr;
132
120
        char    *env;
148
136
        if ((env = getenv("MYSQL_TCP_PORT")))
149
137
          mysql_port =(uint) atoi(env);
150
138
      }
151
 
#endif
152
139
    }
153
140
    if (!mysql_unix_port)
154
141
    {