Blame source/uds/typeDefs.h

Packit Service 310c69
/*
Packit Service 310c69
 * Copyright (c) 2020 Red Hat, Inc.
Packit Service 310c69
 *
Packit Service 310c69
 * This program is free software; you can redistribute it and/or
Packit Service 310c69
 * modify it under the terms of the GNU General Public License
Packit Service 310c69
 * as published by the Free Software Foundation; either version 2
Packit Service 310c69
 * of the License, or (at your option) any later version.
Packit Service 310c69
 * 
Packit Service 310c69
 * This program is distributed in the hope that it will be useful,
Packit Service 310c69
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 310c69
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service 310c69
 * GNU General Public License for more details.
Packit Service 310c69
 * 
Packit Service 310c69
 * You should have received a copy of the GNU General Public License
Packit Service 310c69
 * along with this program; if not, write to the Free Software
Packit Service 310c69
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
Packit Service 310c69
 * 02110-1301, USA. 
Packit Service 310c69
 *
Packit Service 310c69
 * $Id: //eng/uds-releases/jasper/kernelLinux/uds/typeDefs.h#1 $
Packit Service 310c69
 */
Packit Service 310c69
Packit Service 310c69
#ifndef LINUX_KERNEL_TYPE_DEFS_H
Packit Service 310c69
#define LINUX_KERNEL_TYPE_DEFS_H
Packit Service 310c69
Packit Service 310c69
/*
Packit Service 310c69
 * General system type definitions.  This file is parallel to the other
Packit Service 310c69
 * typeDefs.h files in this project.  We pick up what we can from the system
Packit Service 310c69
 * include files, and explicitly define the other things we need.
Packit Service 310c69
 */
Packit Service 310c69
Packit Service 310c69
#include <linux/kernel.h>
Packit Service 310c69
#include <linux/types.h>
Packit Service 310c69
#include <stddef.h>
Packit Service 310c69
Packit Service 310c69
#define CHAR_BIT 8
Packit Service 310c69
Packit Service 310c69
#define INT64_MAX  (9223372036854775807L)
Packit Service 310c69
#define UCHAR_MAX  ((unsigned char)~0ul)
Packit Service 310c69
#define UINT8_MAX  ((uint8_t)~0ul)
Packit Service 310c69
#define UINT16_MAX ((uint16_t)~0ul)
Packit Service 310c69
#define UINT64_MAX ((uint64_t)~0ul)
Packit Service 310c69
Packit Service 310c69
// Some recent versions of <linux/kernel.h> define this for us
Packit Service 310c69
#ifndef SIZE_MAX
Packit Service 310c69
#define SIZE_MAX   ((size_t)~0ul)
Packit Service 310c69
#endif
Packit Service 310c69
Packit Service 310c69
#define PRId64 "lld"
Packit Service 310c69
#define PRIu16 "u"
Packit Service 310c69
#define PRIu32 "u"
Packit Service 310c69
#define PRIu64 "llu"
Packit Service 310c69
Packit Service 310c69
typedef unsigned long uintmax_t;
Packit Service 310c69
#define PRIuMAX "lu"
Packit Service 310c69
Packit Service 310c69
typedef unsigned char byte;
Packit Service 310c69
Packit Service 310c69
#endif /* LINUX_KERNEL_TYPE_DEFS_H */