MySQL 8.3.0
Source Code Documentation
types.h
Go to the documentation of this file.
1/* Copyright (c) 2010, 2023, 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/* fixincludes should not add extern "C" to this file */
24/*
25 * Rpc additions to <sys/types.h>
26 */
27#ifndef _RPC_TYPES_H
28#define _RPC_TYPES_H 1
29
30#if defined(_WIN32)
32#endif
33
34typedef int bool_t;
35typedef int enum_t;
36/* This needs to be changed to uint32_t in the future */
37typedef unsigned long rpcprog_t;
38typedef unsigned long rpcvers_t;
39typedef unsigned long rpcproc_t;
40typedef unsigned long rpcprot_t;
41typedef unsigned long rpcport_t;
42
43#define __dontcare__ -1
44
45#ifndef FALSE
46#define FALSE (0)
47#endif
48
49#ifndef TRUE
50#define TRUE (1)
51#endif
52
53#ifndef NULL
54#define NULL 0
55#endif
56
57#include <stdlib.h> /* For malloc decl. */
58#define mem_alloc(bsize) malloc(bsize)
59/*
60 * XXX: This must not use the second argument, or code in xdr_array.c needs
61 * to be modified.
62 */
63#define mem_free(ptr, bsize) free(ptr)
64
65#ifndef makedev /* ie, we haven't already included it */
66#include <sys/types.h>
67#endif
68
69#ifndef __u_char_defined
70typedef __u_char u_char;
71typedef __u_short u_short;
72typedef __u_int u_int;
73typedef __u_long u_long;
74typedef __quad_t quad_t;
75typedef __u_quad_t u_quad_t;
76typedef __fsid_t fsid_t;
77#define __u_char_defined
78#endif
79#ifndef __daddr_t_defined
80typedef __daddr_t daddr_t;
81typedef __caddr_t caddr_t;
82#define __daddr_t_defined
83#endif
84
85#include <sys/time.h>
86#if !defined(_WIN32)
87#include <sys/param.h>
88
89#include <netinet/in.h>
90#endif
91
92#ifndef INADDR_LOOPBACK
93#define INADDR_LOOPBACK (u_long)0x7F000001
94#endif
95#ifndef MAXHOSTNAMELEN
96#define MAXHOSTNAMELEN 64
97#endif
98
99#endif /* rpc/types.h */
Include file for Sun RPC to compile out of the box.
unsigned long rpcprot_t
Definition: types.h:40
__u_int u_int
Definition: types.h:72
unsigned long rpcprog_t
Definition: types.h:37
__u_long u_long
Definition: types.h:73
__u_short u_short
Definition: types.h:71
__daddr_t daddr_t
Definition: types.h:80
int bool_t
Definition: types.h:34
__quad_t quad_t
Definition: types.h:74
unsigned long rpcproc_t
Definition: types.h:39
unsigned long rpcvers_t
Definition: types.h:38
unsigned long rpcport_t
Definition: types.h:41
__fsid_t fsid_t
Definition: types.h:76
__u_char u_char
Definition: types.h:70
__caddr_t caddr_t
Definition: types.h:81
int enum_t
Definition: types.h:35
__u_quad_t u_quad_t
Definition: types.h:75