1dnl 2dnl Copyright (c) Cisco Systems, Inc, 2008 3dnl 4dnl This program is free software; you can redistribute it and/or modify 5dnl it under the terms of the GNU General Public License as published by 6dnl the Free Software Foundation; either version 2 of the License, or 7dnl (at your option) any later version. 8dnl 9dnl This program is distributed in the hope that it will be useful, 10dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 11dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 12dnl the GNU General Public License for more details. 13dnl 14dnl You should have received a copy of the GNU General Public License 15dnl along with this program; if not, write to the Free Software 16dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17dnl 18 19dnl 20dnl LTP_CHECK_SYSCALL_QUOTACTL 21dnl ---------------------------- 22dnl 23AC_DEFUN([LTP_CHECK_SYSCALL_QUOTACTL],[dnl 24 AC_LINK_IFELSE([AC_LANG_SOURCE([ 25#define _LINUX_QUOTA_VERSION 2 26#include <sys/types.h> 27#include <sys/quota.h> 28#include <unistd.h> 29int main(void) { 30 struct dqblk dq; 31 return quotactl(QCMD(Q_GETINFO, USRQUOTA), (const char *) "/dev/null", 32 geteuid(), (caddr_t) &dq); 33}])],[has_quotav2="yes"]) 34 35if test "x$has_quotav2" = xyes; then 36 AC_DEFINE(HAVE_QUOTAV2,1,[Define to 1 if you have quota v2]) 37else 38 39 # got quota v1? 40 AC_LINK_IFELSE([AC_LANG_SOURCE([ 41#define _LINUX_QUOTA_VERSION 1 42#include <sys/types.h> 43#include <sys/quota.h> 44#include <unistd.h> 45int main(void) { 46 struct dqblk dq; 47 return quotactl(QCMD(Q_GETQUOTA, USRQUOTA), (const char *) "/dev/null", 48 geteuid(), (caddr_t) &dq); 49}])],[has_quotav1="yes"]) 50 51 if test "x$has_quotav1" = xyes; then 52 AC_DEFINE(HAVE_QUOTAV1,1,[Define to 1 if you have quota v1]) 53 else 54 AC_MSG_WARN(Couldn't determine quota version (please submit config.log and manpage to ltp@lists.linux.it)) 55 fi 56 57fi 58]) 59