X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fcompiler.h;h=a7e91bfec1f805b35c8f2c6d15608fcf556bbc68;hb=d1d0556e538bf04cb0b991b7acb205c144a2f826;hp=a53b44d7161775cc34b5628edf6dcff7b5403745;hpb=b5a94c85822eb737da0bb01b94be0531a3e9bbb7;p=pspp diff --git a/src/libpspp/compiler.h b/src/libpspp/compiler.h index a53b44d716..a7e91bfec1 100644 --- a/src/libpspp/compiler.h +++ b/src/libpspp/compiler.h @@ -1,20 +1,18 @@ -/* PSPP - computes sample statistics. - Copyright (C) 2006 Free Software Foundation, Inc. +/* PSPP - a program for statistical analysis. + Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - 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. + 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. */ + along with this program. If not, see . */ #ifndef COMPILER_H #define COMPILER_H 1 @@ -47,7 +45,7 @@ non-`NULL' pointer it returns cannot alias any other pointer valid when the function returns. */ #if __GNUC__ > 2 -#define MALLOC_LIKE ATTRIBUTE ((malloc)) +#define MALLOC_LIKE ATTRIBUTE ((__malloc__)) #else #define MALLOC_LIKE #endif @@ -79,4 +77,14 @@ #define PURE_FUNCTION #endif +/* This attribute indicates that the argument with the given + IDX must be a null pointer. IDX counts backward in the + argument list, so that 0 is the last argument, 1 is the + second-from-last argument, and so on. */ +#if __GNUC__ > 3 +#define SENTINEL(IDX) ATTRIBUTE ((sentinel(IDX))) +#else +#define SENTINEL(IDX) +#endif + #endif /* compiler.h */