X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=resource%2Fcsdk%2Fconnectivity%2Flib%2Flibcoap-4.1.1%2Fbits.h;h=20281a0d8078a1402cf227afc96ce76c0f9aa243;hb=935fdb9b67b6c10d007e652e9e2e028fd6ccfe09;hp=487af392d6f8de86afc7489f1ecdc3c19b2ddca8;hpb=00b3660e45c56cb3db35dc2596a054f801b5591a;p=platform%2Fupstream%2Fiotivity.git diff --git a/resource/csdk/connectivity/lib/libcoap-4.1.1/bits.h b/resource/csdk/connectivity/lib/libcoap-4.1.1/bits.h index 487af39..20281a0 100644 --- a/resource/csdk/connectivity/lib/libcoap-4.1.1/bits.h +++ b/resource/csdk/connectivity/lib/libcoap-4.1.1/bits.h @@ -4,7 +4,7 @@ * Copyright (C) 2010,2011 Olaf Bergmann * * This file is part of the CoAP library libcoap. Please see - * README for terms of use. + * README for terms of use. */ /** @@ -15,18 +15,20 @@ #ifndef _BITS_H_ #define _BITS_H_ +#ifdef HAVE_SYS_TYPES_H #include +#endif #include -/** +/** * Sets the bit @p bit in bit-vector @p vec. This function returns @c * 1 if bit was set or @c -1 on error (i.e. when the given bit does * not fit in the vector). - * + * * @param vec The bit-vector to change. * @param size The size of @p vec in bytes. * @param bit The bit to set in @p vec. - * + * * @return @c -1 if @p bit does not fit into @p vec, @c 1 otherwise. */ inline static int bits_setb(uint8_t *vec, size_t size, uint8_t bit) @@ -38,15 +40,15 @@ inline static int bits_setb(uint8_t *vec, size_t size, uint8_t bit) return 1; } -/** +/** * Clears the bit @p bit from bit-vector @p vec. This function returns * @c 1 if bit was cleared or @c -1 on error (i.e. when the given bit * does not fit in the vector). - * + * * @param vec The bit-vector to change. * @param size The size of @p vec in bytes. * @param bit The bit to clear from @p vec. - * + * * @return @c -1 if @p bit does not fit into @p vec, @c 1 otherwise. */ inline static int bits_clrb(uint8_t *vec, size_t size, uint8_t bit) @@ -58,14 +60,14 @@ inline static int bits_clrb(uint8_t *vec, size_t size, uint8_t bit) return 1; } -/** +/** * Gets the status of bit @p bit from bit-vector @p vec. This function returns * @c 1 if the bit is set, @c 0 otherwise (even in case of an error).. - * + * * @param vec The bit-vector to read from.. * @param size The size of @p vec in bytes. * @param bit The bit to get from @p vec. - * + * * @return @c 1 if the bit is set, @c 0 otherwise. */ inline static int bits_getb(const uint8_t *vec, size_t size, uint8_t bit)