diff options
author | unknown <anozdrin@mysql.com> | 2006-05-19 04:51:23 +0400 |
---|---|---|
committer | unknown <anozdrin@mysql.com> | 2006-05-19 04:51:23 +0400 |
commit | e8571560191b9e9c63d4781f520333ea1973d85b (patch) | |
tree | 49302be6f94e4a3379379208fb3bf03436b16df6 /include/m_string.h | |
parent | 01ecf2191bd59c267a578e577e39e7d9673a0f44 (diff) | |
download | mariadb-git-e8571560191b9e9c63d4781f520333ea1973d85b.tar.gz |
Fix compilation problems on Windows and SUN Solaris.
include/m_string.h:
Fix declaration of C-structure for Visual Studio and Sun C-compiler.
server-tools/instance-manager/IMService.cpp:
Fixed.
server-tools/instance-manager/Makefile.am:
Removed gcc-specific flags.
server-tools/instance-manager/commands.cc:
Moved m_string.h to the header.
server-tools/instance-manager/commands.h:
Replaced forward declaration of LEX_STRING because
it is not understood by all compilers.
server-tools/instance-manager/instance_map.cc:
1. Moved m_string.h to the header.
2. Use (const char *) to point to const C-string.
server-tools/instance-manager/instance_map.h:
Replaced forward declaration of LEX_STRING because
it is not understood by all compilers.
server-tools/instance-manager/instance_options.h:
Fixed headers.
server-tools/instance-manager/mysqlmanager.cc:
Fixed headers.
server-tools/instance-manager/user_management_commands.cc:
Removed unused variables.
server-tools/instance-manager/user_map.cc:
Fixed headers.
Diffstat (limited to 'include/m_string.h')
-rw-r--r-- | include/m_string.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/m_string.h b/include/m_string.h index 2fddf4a83dd..f57b3eff8a0 100644 --- a/include/m_string.h +++ b/include/m_string.h @@ -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)) |