this is testing

Committer:
pmallick
Date:
Thu Jan 14 18:54:16 2021 +0530
Revision:
0:3afcd581558d
this is testing

Who changed what in which revision?

UserRevisionLine numberNew contents of line
pmallick 0:3afcd581558d 1 /*
pmallick 0:3afcd581558d 2 * libtinyiiod - Tiny IIO Daemon Library
pmallick 0:3afcd581558d 3 *
pmallick 0:3afcd581558d 4 * Copyright (C) 2019 Analog Devices, Inc.
pmallick 0:3afcd581558d 5 * Author: Cristian Pop <cristian.pop@analog.com>
pmallick 0:3afcd581558d 6 *
pmallick 0:3afcd581558d 7 * This library is free software; you can redistribute it and/or
pmallick 0:3afcd581558d 8 * modify it under the terms of the GNU Lesser General Public
pmallick 0:3afcd581558d 9 * License as published by the Free Software Foundation; either
pmallick 0:3afcd581558d 10 * version 2.1 of the License, or (at your option) any later version.
pmallick 0:3afcd581558d 11 *
pmallick 0:3afcd581558d 12 * This library is distributed in the hope that it will be useful,
pmallick 0:3afcd581558d 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
pmallick 0:3afcd581558d 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
pmallick 0:3afcd581558d 15 * Lesser General Public License for more details.
pmallick 0:3afcd581558d 16 */
pmallick 0:3afcd581558d 17
pmallick 0:3afcd581558d 18 #ifndef COMPAT_H
pmallick 0:3afcd581558d 19 #define COMPAT_H
pmallick 0:3afcd581558d 20
pmallick 0:3afcd581558d 21 #ifdef _USE_STD_INT_TYPES
pmallick 0:3afcd581558d 22 #include <stdint.h>
pmallick 0:3afcd581558d 23 #include <inttypes.h>
pmallick 0:3afcd581558d 24 #include <stdlib.h>
pmallick 0:3afcd581558d 25 #include <stdbool.h>
pmallick 0:3afcd581558d 26 #include <stdio.h>
pmallick 0:3afcd581558d 27 #include <inttypes.h>
pmallick 0:3afcd581558d 28 #include <errno.h>
pmallick 0:3afcd581558d 29 #include <string.h>
pmallick 0:3afcd581558d 30 #else // _USE_STD_INT_TYPES
pmallick 0:3afcd581558d 31 #if !defined(__ssize_t_defined) && !defined(_SSIZE_T_DEFINED)
pmallick 0:3afcd581558d 32 typedef long int ssize_t;
pmallick 0:3afcd581558d 33 typedef unsigned long int size_t;
pmallick 0:3afcd581558d 34 #define __ssize_t_defined
pmallick 0:3afcd581558d 35 #define _SSIZE_T_DEFINED
pmallick 0:3afcd581558d 36 #endif
pmallick 0:3afcd581558d 37
pmallick 0:3afcd581558d 38 typedef long int32_t;
pmallick 0:3afcd581558d 39 typedef unsigned long uint32_t;
pmallick 0:3afcd581558d 40 typedef int bool;
pmallick 0:3afcd581558d 41
pmallick 0:3afcd581558d 42 #define true 1
pmallick 0:3afcd581558d 43 #define false 0
pmallick 0:3afcd581558d 44
pmallick 0:3afcd581558d 45 #define NULL (void*)0
pmallick 0:3afcd581558d 46
pmallick 0:3afcd581558d 47 #define ENOENT 2 /* No such file or directory */
pmallick 0:3afcd581558d 48 #define EIO 5 /* I/O error */
pmallick 0:3afcd581558d 49 #define ENODEV 19 /* No such device */
pmallick 0:3afcd581558d 50 #define EINVAL 22 /* Invalid argument */
pmallick 0:3afcd581558d 51 #define ENOSYS 38 /* Function not implemented */
pmallick 0:3afcd581558d 52
pmallick 0:3afcd581558d 53 #define PRIi32 "li"
pmallick 0:3afcd581558d 54 # define PRIx32 "x"
pmallick 0:3afcd581558d 55 # define PRIu16 "u"
pmallick 0:3afcd581558d 56 #endif //_USE_STD_INT_TYPES
pmallick 0:3afcd581558d 57
pmallick 0:3afcd581558d 58 #endif /* COMPAT_H */