mariadb/storage/connect/osutil.h
Sergey Vojtovich b2aea91fcb MDEV-4786 - merge 10.0-monty → 10.0
Fixed connect compilation failure.

storage/connect/csort.cpp:
  min/max are not defined by my_global.h anymore, include osutil.h instead.
storage/connect/filamfix.cpp:
  min/max are not defined by my_global.h anymore, include osutil.h instead.
storage/connect/ha_connect.cc:
  Renamed MYSQL_ERROR -> Sql_condition.
  Renamed KEY::key_parts -> KEY::user_defined_key_parts.
  Adjusted connect according to:
  WL#4305 - storage-engine private data area per physical table.
storage/connect/ha_connect.h:
  Adjusted connect according to:
  WL#4305 - storage-engine private data area per physical table.
storage/connect/inihandl.c:
  min/max are not defined by my_global.h anymore, include osutil.h instead.
storage/connect/osutil.h:
  min/max are not defined by my_global.h anymore, define them for C as well.
storage/connect/taboccur.cpp:
  Include server headers before osutil.h to avoid min/max redefinition.
storage/connect/tabpivot.cpp:
  Include server headers before osutil.h to avoid min/max redefinition.
storage/connect/tabtbl.cpp:
  Include server headers before osutil.h to avoid min/max redefinition.
storage/connect/tabxcl.cpp:
  Include server headers before osutil.h to avoid min/max redefinition.
storage/connect/value.cpp:
  min/max are not defined by my_global.h anymore, include osutil.h instead.
  Include server headers before osutil.h to avoid min/max redefinition.
2013-07-23 18:29:16 +04:00

63 lines
1.1 KiB
C

#ifndef __OSUTIL_H__
#define __OSUTIL_H__
#if defined(UNIX) || defined(UNIV_LINUX)
#include "my_global.h"
#include <errno.h>
#include <stddef.h>
#include "os.h"
#define MB_OK 0x00000000
#if !defined(__MINMAX_DEFINED)
#define __MINMAX_DEFINED
#ifndef max
#define max(x,y) (((x)>(y))?(x):(y))
#endif
#ifndef min
#define min(x,y) (((x)<(y))?(x):(y))
#endif
#endif
#ifdef __cplusplus
extern "C" {
#endif
int GetLastError();
void _splitpath(const char*, char*, char*, char*, char*);
void _makepath(char*, const char*, const char*, const char*, const char*);
char *_fullpath(char *absPath, const char *relPath, size_t maxLength);
BOOL MessageBeep(uint);
unsigned long _filelength(int fd);
PSZ strupr(PSZ s);
PSZ strlwr(PSZ s);
typedef size_t FILEPOS;
//pedef int FILEHANDLE; // UNIX
#ifdef __cplusplus
}
#endif
#else /* WINDOWS */
#include <windows.h>
typedef __int64 FILEPOS;
//pedef HANDLE FILEHANDLE; // Win32
#endif /* WINDOWS */
#define XSTR(x) ((x)?(x):"<null>")
#ifdef __cplusplus
extern "C" {
#endif
my_bool CloseFileHandle(HANDLE h);
#ifdef __cplusplus
}
#endif
#endif /* __OSUTIL_H__ */