MySQL 8.0.29
Source Code Documentation
my_io_bits.h
Go to the documentation of this file.
1/* Copyright (c) 2016, 2022, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is also distributed with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have included with MySQL.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef COMPONENTS_SERVICES_BITS_MY_IO_BITS_H
24#define COMPONENTS_SERVICES_BITS_MY_IO_BITS_H
25
26/**
27 @file mysql/components/services/bits/my_io_bits.h
28 Types to make file and socket I/O compatible.
29*/
30
31#if defined(_WIN32) && !defined(MYSQL_ABI_CHECK)
32/* Include common headers.*/
33#include <io.h> /* access(), chmod() */
34#ifdef WIN32_LEAN_AND_MEAN
35#include <winsock2.h>
36#include <ws2tcpip.h> /* SOCKET */
37#endif
38#endif
39
40#ifndef MYSQL_ABI_CHECK
41#if !defined(_WIN32)
42#include <sys/socket.h>
43#include <unistd.h>
44#endif
45#include <errno.h>
46#include <limits.h>
47#include <sys/types.h> // Needed for mode_t, so IWYU pragma: keep.
48#endif
49
50typedef int File; /* File descriptor */
51#if defined(_WIN32) && !defined(MYSQL_ABI_CHECK)
52typedef int MY_MODE;
53typedef int mode_t;
54typedef int socket_len_t;
55typedef SOCKET my_socket;
56#else
57typedef mode_t MY_MODE;
58typedef socklen_t socket_len_t;
59typedef int my_socket; /* File descriptor for sockets */
60#endif /* _WIN32 */
61
62#endif /* COMPONENTS_SERVICES_BITS_MY_IO_BITS_H */
mode_t MY_MODE
Definition: my_io_bits.h:57
int File
Definition: my_io_bits.h:50
int my_socket
Definition: my_io_bits.h:59
socklen_t socket_len_t
Definition: my_io_bits.h:58