MySQL 9.1.0
Source Code Documentation
types.h
Go to the documentation of this file.
1/* Copyright (c) 2010, 2024, 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 designed to work 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 either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24/* fixincludes should not add extern "C" to this file */
25/*
26 * Rpc additions to <sys/types.h>
27 */
28#ifndef _RPC_TYPES_H
29#define _RPC_TYPES_H 1
30
31#if defined(_WIN32)
33#endif
34
35typedef int bool_t;
36typedef int enum_t;
37/* This needs to be changed to uint32_t in the future */
38typedef unsigned long rpcprog_t;
39typedef unsigned long rpcvers_t;
40typedef unsigned long rpcproc_t;
41typedef unsigned long rpcprot_t;
42typedef unsigned long rpcport_t;
43
44#define __dontcare__ -1
45
46#ifndef FALSE
47#define FALSE (0)
48#endif
49
50#ifndef TRUE
51#define TRUE (1)
52#endif
53
54#ifndef NULL
55#define NULL 0
56#endif
57
58#include <stdlib.h> /* For malloc decl. */
59#define mem_alloc(bsize) malloc(bsize)
60/*
61 * XXX: This must not use the second argument, or code in xdr_array.c needs
62 * to be modified.
63 */
64#define mem_free(ptr, bsize) free(ptr)
65
66#ifndef makedev /* ie, we haven't already included it */
67#include <sys/types.h>
68#endif
69
70#ifndef __u_char_defined
71typedef __u_char u_char;
72typedef __u_short u_short;
73typedef __u_int u_int;
74typedef __u_long u_long;
75typedef __quad_t quad_t;
76typedef __u_quad_t u_quad_t;
77typedef __fsid_t fsid_t;
78#define __u_char_defined
79#endif
80#ifndef __daddr_t_defined
81typedef __daddr_t daddr_t;
82typedef __caddr_t caddr_t;
83#define __daddr_t_defined
84#endif
85
86#include <sys/time.h>
87#if !defined(_WIN32)
88#include <sys/param.h>
89
90#include <netinet/in.h>
91#endif
92
93#ifndef INADDR_LOOPBACK
94#define INADDR_LOOPBACK (u_long)0x7F000001
95#endif
96#ifndef MAXHOSTNAMELEN
97#define MAXHOSTNAMELEN 64
98#endif
99
100#endif /* rpc/types.h */
Include file for Sun RPC to compile out of the box.
unsigned long rpcprot_t
Definition: types.h:41
__u_int u_int
Definition: types.h:73
unsigned long rpcprog_t
Definition: types.h:38
__u_long u_long
Definition: types.h:74
__u_short u_short
Definition: types.h:72
__daddr_t daddr_t
Definition: types.h:81
int bool_t
Definition: types.h:35
__quad_t quad_t
Definition: types.h:75
unsigned long rpcproc_t
Definition: types.h:40
unsigned long rpcvers_t
Definition: types.h:39
unsigned long rpcport_t
Definition: types.h:42
__fsid_t fsid_t
Definition: types.h:77
__u_char u_char
Definition: types.h:71
__caddr_t caddr_t
Definition: types.h:82
int enum_t
Definition: types.h:36
__u_quad_t u_quad_t
Definition: types.h:76