X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fmacros.h;h=cce09a6cbb66b0474d25dabcf34a43e3728f71ef;hp=2120c64efcd2050186794f15cc2bfcd9475baf45;hb=e66d26f5110d65c1f9549904a33986797a3759a4;hpb=1a65bbb8755fa1ae4a013bc1aa94c39297b8779e diff --git a/src/common/macros.h b/src/common/macros.h index 2120c64ef..cce09a6cb 100644 --- a/src/common/macros.h +++ b/src/common/macros.h @@ -1,19 +1,9 @@ /* - * Copyright (C) 2011 - David Goulet - * Mathieu Desnoyers + * Copyright (C) 2011 David Goulet + * Copyright (C) 2011 Mathieu Desnoyers * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2 only, - * as published by the Free Software Foundation. + * SPDX-License-Identifier: GPL-2.0-only * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _MACROS_H @@ -87,6 +77,8 @@ void *zmalloc(size_t len) #define LTTNG_PACKED __attribute__((__packed__)) #endif +#define is_signed(type) (((type) (-1)) < 0) + /* * Align value to the next multiple of align. Returns val if it already is a * multiple of align. Align must be a power of two.