mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
WL#5486: Remove code for unsupported platforms
Remove MS-DOS specific code.
This commit is contained in:
@ -34,7 +34,7 @@
|
||||
#ifdef HAVE_PWD_H
|
||||
#include <pwd.h>
|
||||
#endif
|
||||
#if !defined(MSDOS) && !defined(__WIN__)
|
||||
#if !defined(__WIN__)
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
@ -45,7 +45,7 @@
|
||||
#ifdef HAVE_SYS_SELECT_H
|
||||
#include <sys/select.h>
|
||||
#endif
|
||||
#endif /* !defined(MSDOS) && !defined(__WIN__) */
|
||||
#endif /* !defined(__WIN__) */
|
||||
#ifdef HAVE_POLL
|
||||
#include <sys/poll.h>
|
||||
#endif
|
||||
@ -74,7 +74,7 @@ ulong max_allowed_packet= 1024L*1024L*1024L;
|
||||
my_bool net_flush(NET *net);
|
||||
#endif
|
||||
|
||||
#if defined(MSDOS) || defined(__WIN__)
|
||||
#if defined(__WIN__)
|
||||
/* socket_errno is defined in my_global.h for all platforms */
|
||||
#define perror(A)
|
||||
#else
|
||||
@ -128,31 +128,29 @@ int STDCALL mysql_server_init(int argc __attribute__((unused)),
|
||||
init_client_errs();
|
||||
if (!mysql_port)
|
||||
{
|
||||
mysql_port = MYSQL_PORT;
|
||||
#ifndef MSDOS
|
||||
{
|
||||
struct servent *serv_ptr __attribute__((unused));
|
||||
char *env;
|
||||
char *env;
|
||||
struct servent *serv_ptr __attribute__((unused));
|
||||
|
||||
/*
|
||||
if builder specifically requested a default port, use that
|
||||
(even if it coincides with our factory default).
|
||||
only if they didn't do we check /etc/services (and, failing
|
||||
on that, fall back to the factory default of 3306).
|
||||
either default can be overridden by the environment variable
|
||||
MYSQL_TCP_PORT, which in turn can be overridden with command
|
||||
line options.
|
||||
*/
|
||||
mysql_port = MYSQL_PORT;
|
||||
|
||||
/*
|
||||
if builder specifically requested a default port, use that
|
||||
(even if it coincides with our factory default).
|
||||
only if they didn't do we check /etc/services (and, failing
|
||||
on that, fall back to the factory default of 3306).
|
||||
either default can be overridden by the environment variable
|
||||
MYSQL_TCP_PORT, which in turn can be overridden with command
|
||||
line options.
|
||||
*/
|
||||
|
||||
#if MYSQL_PORT_DEFAULT == 0
|
||||
if ((serv_ptr = getservbyname("mysql", "tcp")))
|
||||
mysql_port = (uint) ntohs((ushort) serv_ptr->s_port);
|
||||
#endif
|
||||
if ((env = getenv("MYSQL_TCP_PORT")))
|
||||
mysql_port =(uint) atoi(env);
|
||||
}
|
||||
if ((serv_ptr= getservbyname("mysql", "tcp")))
|
||||
mysql_port= (uint) ntohs((ushort) serv_ptr->s_port);
|
||||
#endif
|
||||
if ((env= getenv("MYSQL_TCP_PORT")))
|
||||
mysql_port=(uint) atoi(env);
|
||||
}
|
||||
|
||||
if (!mysql_unix_port)
|
||||
{
|
||||
char *env;
|
||||
@ -479,7 +477,7 @@ struct passwd *getpwuid(uid_t);
|
||||
char* getlogin(void);
|
||||
#endif
|
||||
|
||||
#if !defined(MSDOS) && ! defined(VMS) && !defined(__WIN__)
|
||||
#if !defined(VMS) && !defined(__WIN__)
|
||||
|
||||
void read_user_name(char *name)
|
||||
{
|
||||
@ -509,7 +507,7 @@ void read_user_name(char *name)
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
#else /* If MSDOS || VMS */
|
||||
#else /* If Windows || VMS */
|
||||
|
||||
void read_user_name(char *name)
|
||||
{
|
||||
|
Reference in New Issue
Block a user