Sha256: 8f5898c34ddd691d17339d7c65b697aa6749e996eb76bf0957169650def64480

Contents?: true

Size: 1.4 KB

Versions: 10

Compression:

Stored size: 1.4 KB

Contents

/* Copyright (C) 2010 by Daniel Stenberg
 *
 * Permission to use, copy, modify, and distribute this
 * software and its documentation for any purpose and without
 * fee is hereby granted, provided that the above copyright
 * notice appear in all copies and that both that copyright
 * notice and this permission notice appear in supporting
 * documentation, and that the name of M.I.T. not be used in
 * advertising or publicity pertaining to distribution of the
 * software without specific, written prior permission.
 * M.I.T. makes no representations about the suitability of
 * this software for any purpose.  It is provided "as is"
 * without express or implied warranty.
 */


#include "ares_setup.h"

#include "ares_nowarn.h"

#define CARES_MASK_UINT (~(unsigned int) 0)
#define CARES_MASK_SINT (CARES_MASK_UINT >> 1)

/*
** size_t to signed int
*/

int aresx_uztosi(size_t uznum)
{
#ifdef __INTEL_COMPILER
#  pragma warning(push)
#  pragma warning(disable:810) /* conversion may lose significant bits */
#endif

  return (int)(uznum & (size_t) CARES_MASK_SINT);

#ifdef __INTEL_COMPILER
#  pragma warning(pop)
#endif
}

/*
** signed long to signed int
*/

int aresx_sltosi(long slnum)
{
#ifdef __INTEL_COMPILER
#  pragma warning(push)
#  pragma warning(disable:810) /* conversion may lose significant bits */
#endif

  return (int)(slnum & (long) CARES_MASK_SINT);

#ifdef __INTEL_COMPILER
#  pragma warning(pop)
#endif
}

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
noderb-0.0.12 ext/noderb_extension/libuv/src/ares/ares_nowarn.c
noderb-0.0.11 ext/noderb_extension/libuv/src/ares/ares_nowarn.c
noderb-0.0.10 ext/noderb_extension/libuv/src/ares/ares_nowarn.c
noderb-0.0.9 ext/noderb_extension/libuv/src/ares/ares_nowarn.c
noderb-0.0.8 ext/noderb_extension/libuv/src/ares/ares_nowarn.c
noderb-0.0.7 ext/noderb_extension/libuv/src/ares/ares_nowarn.c
noderb-0.0.6 ext/noderb_extension/libuv/src/ares/ares_nowarn.c
noderb-0.0.4 ext/noderb_extension/libuv/src/ares/ares_nowarn.c
noderb-0.0.3 ext/noderb_extension/libuv/src/ares/ares_nowarn.c
noderb-0.0.2 ext/noderb_extension/libuv/src/ares/ares_nowarn.c