Commit b5517223 authored by anozdrin@mysql.com's avatar anozdrin@mysql.com

Fix compilation problems on Windows and SUN Solaris.

parent 40f93400
......@@ -247,13 +247,19 @@ extern int my_snprintf(char* to, size_t n, const char* fmt, ...);
}
#endif
/* LEX_STRING */
/*
LEX_STRING -- a pair of a C-string and its length.
NOTE: this exactly form of declaration is required for some C-compilers
(for one, Sun C 5.7 2005/01/07). Unfortunatelt with such declaration
LEX_STRING can not be forward declared.
*/
typedef struct LEX_STRING
typedef struct
{
char *str;
uint length;
};
} LEX_STRING;
#define STRING_WITH_LEN(X) (X), ((uint) (sizeof(X) - 1))
#define C_STRING_WITH_SIZE(X) ((char *) (X)), ((uint) (sizeof(X) - 1))
......
......@@ -30,15 +30,14 @@ void IMService::Run(DWORD argc, LPTSTR *argv)
// report to the SCM that we're about to start
ReportStatus((DWORD)SERVICE_START_PENDING);
Options o;
o.load(argc, argv);
Options::load(argc, argv);
// init goes here
ReportStatus((DWORD)SERVICE_RUNNING);
// wait for main loop to terminate
manager(o);
o.cleanup();
manager();
Options::cleanup();
}
void IMService::Log(const char *msg)
......
......@@ -93,9 +93,6 @@ mysqlmanager_LDADD= @CLIENT_EXTRA_LDFLAGS@ \
EXTRA_DIST = WindowsService.cpp WindowsService.h IMService.cpp \
IMService.h cmakelists.txt
AM_CFLAGS = -Werror
AM_CXXFLAGS = -Werror
tags:
ctags -R *.h *.cc
......
......@@ -21,7 +21,6 @@
#include "commands.h"
#include <my_global.h>
#include <m_string.h>
#include <m_ctype.h>
#include <mysql.h>
#include <my_dir.h>
......
......@@ -18,6 +18,7 @@
#include <my_global.h>
#include <my_sys.h>
#include <m_string.h>
#include <hash.h>
#include "command.h"
......@@ -28,7 +29,6 @@
#pragma interface
#endif
struct LEX_STRING;
/*
Print all instances of this instance manager.
......
......@@ -23,7 +23,6 @@
#include <my_global.h>
#include <m_ctype.h>
#include <mysql_com.h>
#include <m_string.h>
#include "buffer.h"
#include "guardian.h"
......@@ -117,7 +116,7 @@ static void parse_option(const char *option_str,
char *option_name_buf,
char *option_value_buf)
{
char *eq_pos;
const char *eq_pos;
const char *ptr= option_str;
while (*ptr == '-')
......
......@@ -18,14 +18,13 @@
#include <my_global.h>
#include <my_sys.h>
#include <m_string.h>
#include <hash.h>
#if defined(__GNUC__) && defined(USE_PRAGMA_INTERFACE)
#pragma interface
#endif
struct LEX_STRING;
class Guardian_thread;
class Instance;
class Named_value_arr;
......
......@@ -20,6 +20,7 @@
#include <my_sys.h>
#include "parse.h"
#include "portability.h" /* for pid_t on Win32 */
#if defined(__GNUC__) && defined(USE_PRAGMA_INTERFACE)
#pragma interface
......
......@@ -34,7 +34,8 @@
#include "user_management_commands.h"
#ifdef __WIN__
#include "windowsservice.h"
#include "IMService.h"
#include "WindowsService.h"
#endif
......
......@@ -216,7 +216,6 @@ int Add_user_cmd::execute()
{
LEX_STRING user_name;
const char *password;
char scrambled_password_buf[SCRAMBLED_PASSWORD_CHAR_LENGTH + 1];
User_map user_map;
User *new_user;
......@@ -310,7 +309,6 @@ int Edit_user_cmd::execute()
{
LEX_STRING user_name;
const char *password;
char scrambled_password_buf[SCRAMBLED_PASSWORD_CHAR_LENGTH + 1];
User_map user_map;
User *user;
......
......@@ -21,6 +21,7 @@
#include "user_map.h"
#include "exit_codes.h"
#include "log.h"
#include "portability.h"
User::User(const LEX_STRING *user_name_arg, const char *password)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment