diff options
author | Davide Beatrici <davidebeatrici@gmail.com> | 2019-09-12 23:44:16 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-12 23:44:16 +0300 |
commit | a38d19a7595c3e672f5ed549400b36348e01e442 (patch) | |
tree | 34bd1c4db9b95748d263aea811e849dec7e5525c /src/Utils.h | |
parent | 713b92c3c233f8f38200c4a458e0196d3d39a3b0 (diff) | |
parent | 15831dbca85dd906edbad2bfff2b147527a456e2 (diff) |
Merge PR #3644: Don't include PCH headers directly, add missing includes
Diffstat (limited to 'src/Utils.h')
-rw-r--r-- | src/Utils.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/Utils.h b/src/Utils.h new file mode 100644 index 000000000..a1a66e2f6 --- /dev/null +++ b/src/Utils.h @@ -0,0 +1,32 @@ +// Copyright 2005-2019 The Mumble Developers. All rights reserved. +// Use of this source code is governed by a BSD-style license +// that can be found in the LICENSE file at the root of the +// Mumble source tree or at <https://www.mumble.info/LICENSE>. + +// This header file defines common utility macros and values that are generally valid or used across multiple areas giving them generic scope (rather than localized or functionality-specific scope). + +#ifndef MUMBLE_UTILS_H_ +#define MUMBLE_UTILS_H_ + +#include "QAtomicIntCompat.h" +#include "Qt4Compat.h" + +#include <QtCore/QtGlobal> + +#define iroundf(x) ( static_cast<int>(x) ) + +#ifdef Q_OS_WIN +# define STACKVAR(type, varname, count) type *varname=reinterpret_cast<type *>(_alloca(sizeof(type) * (count))) +#else +# ifdef WId + typedef WId HWND; +# endif +# define __cdecl +# define INVALID_SOCKET -1 +# define SOCKET_ERROR -1 +# define STACKVAR(type, varname, count) type varname[count] +# define CopyMemory(dst,ptr,len) memcpy(dst,ptr,len) +# define ZeroMemory(ptr,len) memset(ptr, 0, len) +#endif + +#endif // MUMBLE_UTILS_H_ |