mariadb/storage/connect/os.h
Olivier Bertrand bd4814328c - Calculate next position in filamap without assuming ENDING option is true.
modified:
  storage/connect/filamap.cpp

- ftell error: indicate in the error msg that is can be due to wrong ENDING value.
  filamtxt.cpp (MDEV-7030)
modified:
  storage/connect/filamtxt.cpp

- Change STRING according to Alexander Barkov remarks.
  Suppress the wrong Strz function. The unconditional function strz is no more
  used for s->db and s->table_name because they are zero terminated.
modified:
  storage/connect/ha_connect.cc
  storage/connect/xobject.cpp

- Change version number
modified:
  storage/connect/filamap.cpp

- Change PATH_MAX to FN_REFLEN (MDEV-7036)
modified:
  storage/connect/os.h
  storage/connect/tabmul.cpp

- Fix bug by adding a void argument for OP_NOT in Makefilter.
modified:
  storage/connect/filter.cpp

- Begin implementing XMSG style
  Two new system variables are defined:
  msg_lang ENUM session
  errmsg_dir_path STR global readonly
  This is a work in progress.
modified:
  storage/connect/ha_connect.cc
  storage/connect/plgdbutl.cpp
  storage/connect/plugutil.c
  storage/connect/rcmsg.c
  storage/connect/resource.h
2014-11-08 13:35:03 +01:00

66 lines
1.7 KiB
C

#ifndef _OS_H_INCLUDED
#define _OS_H_INCLUDED
#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__)
typedef off_t off64_t;
#define lseek64(fd, offset, whence) lseek((fd), (offset), (whence))
#define open64(path, flags, mode) open((path), (flags), (mode))
#define ftruncate64(fd, length) ftruncate((fd), (length))
#define O_LARGEFILE 0
#endif
#ifdef _AIX
#ifndef O_LARGEFILE
#define O_LARGEFILE 0
#endif
#endif
#if defined(WIN32)
typedef __int64 BIGINT;
#else // !WIN32
typedef longlong BIGINT;
#define FILE_BEGIN SEEK_SET
#define FILE_CURRENT SEEK_CUR
#define FILE_END SEEK_END
#endif // !WIN32
#if !defined(WIN32)
typedef const void *LPCVOID;
typedef const char *LPCTSTR;
typedef const char *LPCSTR;
typedef unsigned char BYTE;
typedef char *LPSTR;
typedef char *LPTSTR;
typedef char *PSZ;
typedef long BOOL;
typedef int INT;
#if !defined(NODW)
/*
sqltypes.h from unixODBC incorrectly defines
DWORD as "unsigned int" instead of "unsigned long" on 64-bit platforms.
Add "#define NODW" into all files including this file that include
sqltypes.h (through sql.h or sqlext.h).
*/
typedef unsigned long DWORD;
#endif /* !NODW */
#undef HANDLE
typedef int HANDLE;
#define stricmp strcasecmp
#define _stricmp strcasecmp
#define strnicmp strncasecmp
#define _strnicmp strncasecmp
#ifdef PATH_MAX
#define _MAX_PATH PATH_MAX
#else
#define _MAX_PATH FN_REFLEN
#endif
#define _MAX_DRIVE 3
#define _MAX_DIR FN_REFLEN
#define _MAX_FNAME FN_HEADLEN
#define _MAX_EXT FN_EXTLEN
#define INVALID_HANDLE_VALUE (-1)
#define __stdcall
#endif /* !WIN32 */
#endif /* _OS_H_INCLUDED */