r11367 - in /trunk/libquota-perl: ./ contrib/ contrib/aix_jfs2_class/ debian/ hints/ include/

rmayorga-guest at users.alioth.debian.org rmayorga-guest at users.alioth.debian.org
Tue Dec 18 07:32:38 UTC 2007


Author: rmayorga-guest
Date: Tue Dec 18 07:32:38 2007
New Revision: 11367

URL: http://svn.debian.org/wsvn/?sc=1&rev=11367
Log:
 - it's clear for GPL/Artistic  to have a "contributed" stanza
   instead a "copyright" one ?
* New upstream release
* Bump Standards-version to 3.7.3 (no changes requiered)
* Adding install-stamp
* Remove copyright info from afsquota.c

Added:
    trunk/libquota-perl/META.yml
      - copied unchanged from r11366, branches/upstream/libquota-perl/current/META.yml
Modified:
    trunk/libquota-perl/CHANGES
    trunk/libquota-perl/MANIFEST
    trunk/libquota-perl/Quota.pm
    trunk/libquota-perl/Quota.xs
    trunk/libquota-perl/README
    trunk/libquota-perl/afsquota.c
    trunk/libquota-perl/contrib/aix_jfs2_class/jfs2class.xs
    trunk/libquota-perl/contrib/aix_jfs2_class/test_jfs2.pl
    trunk/libquota-perl/contrib/mount-list-qcarg.pl
    trunk/libquota-perl/contrib/mount-list.pl
    trunk/libquota-perl/contrib/test-group.pl
    trunk/libquota-perl/debian/changelog
    trunk/libquota-perl/debian/control
    trunk/libquota-perl/debian/copyright
    trunk/libquota-perl/debian/rules
    trunk/libquota-perl/hints/bsd.h
    trunk/libquota-perl/hints/linux.h
    trunk/libquota-perl/include/rquota.h

Modified: trunk/libquota-perl/CHANGES
URL: http://svn.debian.org/wsvn/trunk/libquota-perl/CHANGES?rev=11367&op=diff
==============================================================================
--- trunk/libquota-perl/CHANGES (original)
+++ trunk/libquota-perl/CHANGES Tue Dec 18 07:32:38 2007
@@ -1,3 +1,8 @@
+Changes in 1.6.1 (November 2007)
+- Adapted hints/bsd.h to use statvfs instead of statfs in NetBSD 3.0
+- Added support for extended quota RPC to allow querying group quotas.
+  Thanks to Kostik (koc AT rol.ru) for the suggestion.
+
 Changes in 1.6.0 (October 2007)
 - Work-around for different getmntent() semantics for linux loop mounts
   Thanks Wouter de Jong (wouter at widexs.nl) for reporting this issue.

Modified: trunk/libquota-perl/MANIFEST
URL: http://svn.debian.org/wsvn/trunk/libquota-perl/MANIFEST?rev=11367&op=diff
==============================================================================
--- trunk/libquota-perl/MANIFEST (original)
+++ trunk/libquota-perl/MANIFEST Tue Dec 18 07:32:38 2007
@@ -1,6 +1,7 @@
 CHANGES
 INSTALL
 MANIFEST
+META.yml
 Makefile.PL
 Quota.pm
 Quota.xs

Modified: trunk/libquota-perl/Quota.pm
URL: http://svn.debian.org/wsvn/trunk/libquota-perl/Quota.pm?rev=11367&op=diff
==============================================================================
--- trunk/libquota-perl/Quota.pm (original)
+++ trunk/libquota-perl/Quota.pm Tue Dec 18 07:32:38 2007
@@ -22,7 +22,7 @@
 @ISA = qw(Exporter DynaLoader);
 @EXPORT = ();
 
-$VERSION = '1.6.0';
+$VERSION = '1.6.1';
 
 bootstrap Quota;
 
@@ -150,7 +150,7 @@
 
     ($block_curr, $block_soft, $block_hard, $block_timelimit,
      $inode_curr, $inode_soft, $inode_hard, $inode_timelimit) =
-    Quota::rpcquery($host, $path [,$uid]);
+    Quota::rpcquery($host, $path [,$uid [,kind]]);
 
     Quota::rpcpeer([$port [,$use_tcp [,timeout]]]);
     
@@ -263,12 +263,15 @@
 
 =item I<($bc,$bs,$bh,$bt, $ic,$is,$ih,$it) =>
 
-I<Quota::rpcquery($host,$path,$uid)>
-
-This is equivalent to B<Quota::query("$host:$path",$uid)>, i.e.
+I<Quota::rpcquery($host,$path,$uid,$kind)>
+
+This is equivalent to B<Quota::query("$host:$path",$uid,$kind)>, i.e.
 query quota for a given user on a given remote host via RPC.
-I<$path> is the path of any file or directory inside the wanted
-file system on the remote host.
+I<$path> is the path of any file or directory inside the
+file system on the remote host.  Querying group quotas ($kind = 1)
+is only recently supported on some platforms (e.g. on linux via
+"extended" quota RPC, i.e. quota RPC version 2) so it may fail due
+to lack of support either on client or server side, or both.
 
 =item I<Quota::rpcpeer($port,$use_tcp,timeout)>
 
@@ -371,7 +374,7 @@
 =head1 AUTHORS
 
 This module was created 1995 by Tom Zoerner
-(email: tomzo AT nefkom DOT net)
+(email: tomzo AT users.sourceforge.net)
 and since then continually improved and ported to
 many operating- and file-systems. Numerous people
 have contributed to this process; for a complete

Modified: trunk/libquota-perl/Quota.xs
URL: http://svn.debian.org/wsvn/trunk/libquota-perl/Quota.xs?rev=11367&op=diff
==============================================================================
--- trunk/libquota-perl/Quota.xs (original)
+++ trunk/libquota-perl/Quota.xs Tue Dec 18 07:32:38 2007
@@ -28,10 +28,14 @@
 #ifndef AIX
 #ifndef NO_MNTENT
 FILE *mtab = NULL;
+#else /* NO_MNTENT */
+#ifdef HAVE_STATVFS
+struct statvfs *mntp, *mtab = NULL;
 #else
 struct statfs *mntp, *mtab = NULL;
+#endif
 int mtab_size = 0;
-#endif
+#endif /* NO_MNTENT */
 #else /* AIX */
 static struct vmount *mtab = NULL;
 static aix_mtab_idx, aix_mtab_count;
@@ -126,20 +130,43 @@
 }
 
 int
-getnfsquota(hostp, fsnamep, uid, dqp)
+getnfsquota(hostp, fsnamep, uid, kind, dqp)
   char *hostp, *fsnamep;
   int uid;
+  int kind;
   struct dqblk *dqp;
 {
   struct getquota_args gq_args;
   struct getquota_rslt gq_rslt;
-
-  gq_args.gqa_pathp = fsnamep;
-  gq_args.gqa_uid = uid;
-  if (callaurpc(hostp, RQUOTAPROG, RQUOTAVERS, RQUOTAPROC_GETQUOTA,
-      xdr_getquota_args, &gq_args, xdr_getquota_rslt, &gq_rslt) != 0) {
-    return (-1);
+#ifdef USE_EXT_RQUOTA
+  ext_getquota_args ext_gq_args;
+
+  /*
+   * First try USE_EXT_RQUOTAPROG (Extended quota RPC)
+   */
+  ext_gq_args.gqa_pathp = fsnamep;
+  ext_gq_args.gqa_id = uid;
+  ext_gq_args.gqa_type = ((kind != 0) ? GRPQUOTA : USRQUOTA);
+
+  if (callaurpc(hostp, RQUOTAPROG, EXT_RQUOTAVERS, RQUOTAPROC_GETQUOTA,
+                xdr_ext_getquota_args, &ext_gq_args,
+                xdr_getquota_rslt, &gq_rslt) != 0)
+#endif
+  {
+     /*
+      * Fall back to RQUOTAPROG if the server (or client via compile switch)
+      * don't support extended quota RPC
+      */
+     gq_args.gqa_pathp = fsnamep;
+     gq_args.gqa_uid = uid;
+
+     if (callaurpc(hostp, RQUOTAPROG, RQUOTAVERS, RQUOTAPROC_GETQUOTA,
+                   xdr_getquota_args, &gq_args,
+                   xdr_getquota_rslt, &gq_rslt) != 0) {
+       return (-1);
+     }
   }
+
   switch (gq_rslt.GQR_STATUS) {
   case Q_OK:
     {
@@ -257,8 +284,21 @@
       xdr_u_long(xdrs, (unsigned long *)&rqp->rq_btimeleft) &&
       xdr_u_long(xdrs, (unsigned long *)&rqp->rq_ftimeleft) );
 }
-#endif
-#endif
+#endif /* MY_XDR */
+
+#ifdef USE_EXT_RQUOTA
+bool_t
+xdr_ext_getquota_args(xdrs, objp)
+XDR *xdrs;
+ext_getquota_args *objp;
+{
+  return xdr_string(xdrs, &objp->gqa_pathp, RQ_PATHLEN) &&
+         xdr_int(xdrs, &objp->gqa_type) &&
+         xdr_int(xdrs, &objp->gqa_id);
+}
+#endif /* USE_EXT_RQUOTA */
+
+#endif /* !NO_RPC */
 
 /* -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  *
@@ -351,7 +391,7 @@
 	    if((*dev != '/') && (p = strchr(dev, ':'))) {
 #ifndef NO_RPC
 	      *p = '\0';
-	      err = getnfsquota(dev, p+1, uid, &dqblk);
+              err = getnfsquota(dev, p+1, uid, kind, &dqblk);
 	      *p = ':';
 #else /* NO_RPC */
 	      errno = ENOSYS;
@@ -648,16 +688,18 @@
 	OUTPUT:
 	RETVAL
 
-void
-rpcquery(host,path,uid=getuid())
+
+void 
+rpcquery(host,path,uid=getuid(),kind=0)
 	char *	host
 	char *	path
 	int	uid
+	int     kind
 	PPCODE:
 	{
 #ifndef NO_RPC
 	  struct dqblk dqblk;
-	  if(getnfsquota(host, path, uid, &dqblk) == 0) {
+          if (getnfsquota(host, path, uid, kind, &dqblk) == 0) {
 	    EXTEND(sp, 8);
 	    PUSHs(sv_2mortal(newSViv(Q_DIV(dqblk.QS_BCUR))));
 	    PUSHs(sv_2mortal(newSViv(Q_DIV(dqblk.QS_BSOFT))));
@@ -745,7 +787,7 @@
 	    RETVAL = -1;
 	  else
 	    RETVAL = 0;
-#else
+#else /* NO_MNTENT */
 	  /* if(mtab != NULL) free(mtab); */
 	  if((mtab_size = getmntinfo(&mtab, MNT_NOWAIT)) <= 0)
 	    RETVAL = -1;
@@ -806,7 +848,7 @@
 	  }
 	  else
 	    errno = EBADF;
-#else
+#else /* NO_OPEN_MNTTAB */
 	  struct mnttab mntp;
 	  if(mtab != NULL) {
 	    if(getmntent(mtab, &mntp) == 0)  {
@@ -820,7 +862,7 @@
 	  else
 	    errno = EBADF;
 #endif
-#else
+#else /* NO_MNTENT */
 #ifdef OSF_QUOTA
           char *fstype = getvfsbynumber((int)mntp->f_type);
 #endif
@@ -833,13 +875,21 @@
               PUSHs(sv_2mortal(newSVpv(fstype, strlen(fstype))));
             else
 #endif
-#ifndef __OpenBSD__
+#ifdef __OpenBSD__
+              /* OpenBSD struct statfs lacks the f_type member (starting with release 2.7) */
+              PUSHs(sv_2mortal(newSVpv("", 0)));
+#else /* !__OpenBSD__ */
+#ifdef HAVE_STATVFS
+              PUSHs(sv_2mortal(newSVpv(mntp->f_fstypename, strlen(mntp->f_fstypename))));
+#else
               PUSHs(sv_2mortal(newSViv((IV)mntp->f_type)));
-#else
-              /* OpenBSD struct statfs lacks the f_type member (starting with release 2.7) */
-              PUSHs(sv_2mortal(newSViv((IV)"")));
-#endif
+#endif /* HAVE_STATVFS */
+#endif /* !__OpenBSD__ */
+#ifdef HAVE_STATVFS
+	    PUSHs(sv_2mortal(newSViv((IV)mntp->f_flag)));
+#else
 	    PUSHs(sv_2mortal(newSViv((IV)mntp->f_flags)));
+#endif
 	    mtab_size--;
 	    mntp++;
 	  }

Modified: trunk/libquota-perl/README
URL: http://svn.debian.org/wsvn/trunk/libquota-perl/README?rev=11367&op=diff
==============================================================================
--- trunk/libquota-perl/README (original)
+++ trunk/libquota-perl/README Tue Dec 18 07:32:38 2007
@@ -1,10 +1,10 @@
 Quota extension module for Perl
 -------------------------------
 
-Author:    Tom Zoerner (email: tomzo AT nefkom DOT net)
-
-Version:   1.6.0
-Date:      October 2007
+Author:    Tom Zoerner (tomzo AT users.sourceforge.net)
+
+Version:   1.6.1
+Date:      November 2007
 DLSIP-Code:Rcdfg
            - stable release
            - C compiler required for installation
@@ -20,7 +20,7 @@
            HP-UX 9.0x & 10.10 & 10.20 & 11.00,
            IRIX 5.2 & 5.3 & 6.2 - 6.5,
            OSF/1 & Digital Unix 4,
-           BSDi 2, FreeBSD 3, OpenBSD & NetBSD (no RPC),
+           BSDi 2, FreeBSD 3.x - 4.9, OpenBSD & NetBSD (no RPC),
            Linux - kernel 2.0.30 and later, incl. Quota API v2 and XFS,
            AIX 4.1, 4.2 and 5.3.
            AFS (Andrew File System) on many of the above (see INSTALL),
@@ -270,7 +270,7 @@
 
 AUTHORS
      This module was created 1995 by Tom Zoerner
-     (email: tomzo AT nefkom DOT net)
+     (email: tomzo AT users.sourceforge.net)
      and since then continually improved and ported to
      many operating- and file-systems. Numerous people
      have contributed to this process; for a complete

Modified: trunk/libquota-perl/afsquota.c
URL: http://svn.debian.org/wsvn/trunk/libquota-perl/afsquota.c?rev=11367&op=diff
==============================================================================
--- trunk/libquota-perl/afsquota.c (original)
+++ trunk/libquota-perl/afsquota.c Tue Dec 18 07:32:38 2007
@@ -1,7 +1,7 @@
 /*
  *  Interface to OpenAFS
  *
- *  Copyright 1998,2003 Wolfgang Friebel <friebel at ifh.de>
+ *  Contributed 1998,2003 by Wolfgang Friebel <friebel at ifh.de>
  */
 
 #if defined( __hpux)

Modified: trunk/libquota-perl/contrib/aix_jfs2_class/jfs2class.xs
URL: http://svn.debian.org/wsvn/trunk/libquota-perl/contrib/aix_jfs2_class/jfs2class.xs?rev=11367&op=diff
==============================================================================
--- trunk/libquota-perl/contrib/aix_jfs2_class/jfs2class.xs (original)
+++ trunk/libquota-perl/contrib/aix_jfs2_class/jfs2class.xs Tue Dec 18 07:32:38 2007
@@ -5,6 +5,17 @@
  * It's just provided as possible basis for further development.
  *
  * Copyright (C) 2007 Tom Zoerner.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it either under the terms of the Perl Artistic License or the GNU
+ * General Public License as published by the Free Software Foundation.
+ * (Either version 2 of the GPL, or any later version.)
+ * For a copy of these licenses see <http://www.opensource.org/licenses/>.
+ *
+ * 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
+ * Perl Artistic License or GNU General Public License for more details.
  */
 
 MODULE = Quota  PACKAGE = Quota::JFS2CLASS

Modified: trunk/libquota-perl/contrib/aix_jfs2_class/test_jfs2.pl
URL: http://svn.debian.org/wsvn/trunk/libquota-perl/contrib/aix_jfs2_class/test_jfs2.pl?rev=11367&op=diff
==============================================================================
--- trunk/libquota-perl/contrib/aix_jfs2_class/test_jfs2.pl (original)
+++ trunk/libquota-perl/contrib/aix_jfs2_class/test_jfs2.pl Tue Dec 18 07:32:38 2007
@@ -1,4 +1,16 @@
 #!/usr/bin/perl
+# ------------------------------------------------------------------------ #
+# Interactive test and demo script for the AFS JFS Quota Class Interface
+#
+# Author: Tom Zoerner, 2007
+#
+# This program (test_jfs.pl) is in the public domain and can be used and
+# redistributed without restrictions.
+#
+# 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.
+# ------------------------------------------------------------------------ #
 
 use blib;
 use Quota;

Modified: trunk/libquota-perl/contrib/mount-list-qcarg.pl
URL: http://svn.debian.org/wsvn/trunk/libquota-perl/contrib/mount-list-qcarg.pl?rev=11367&op=diff
==============================================================================
--- trunk/libquota-perl/contrib/mount-list-qcarg.pl (original)
+++ trunk/libquota-perl/contrib/mount-list-qcarg.pl Tue Dec 18 07:32:38 2007
@@ -1,4 +1,13 @@
 #!/usr/bin/perl
+#
+# Author: Tom Zoerner
+#
+# This program (mount-list-qcarg.pl) is in the public domain and can
+# be used and redistributed without restrictions.
+#
+# 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.
 
 use blib;
 use Quota;

Modified: trunk/libquota-perl/contrib/mount-list.pl
URL: http://svn.debian.org/wsvn/trunk/libquota-perl/contrib/mount-list.pl?rev=11367&op=diff
==============================================================================
--- trunk/libquota-perl/contrib/mount-list.pl (original)
+++ trunk/libquota-perl/contrib/mount-list.pl Tue Dec 18 07:32:38 2007
@@ -1,4 +1,13 @@
 #!/usr/bin/perl
+#
+# Author: Tom Zoerner
+#
+# This program (mount-list-qcarg.pl) is in the public domain and can
+# be used and redistributed without restrictions.
+#
+# 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.
 
 use blib;
 use Quota;

Modified: trunk/libquota-perl/contrib/test-group.pl
URL: http://svn.debian.org/wsvn/trunk/libquota-perl/contrib/test-group.pl?rev=11367&op=diff
==============================================================================
--- trunk/libquota-perl/contrib/test-group.pl (original)
+++ trunk/libquota-perl/contrib/test-group.pl Tue Dec 18 07:32:38 2007
@@ -1,6 +1,13 @@
 #!/usr/bin/perl
 #
 # testing group quota support  -tom Apr/02/1999
+#
+# This script is in the public domain and can be used and redistributed
+# without restrictions.
+#
+# 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.
 
 use blib;
 use Quota;

Modified: trunk/libquota-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libquota-perl/debian/changelog?rev=11367&op=diff
==============================================================================
--- trunk/libquota-perl/debian/changelog (original)
+++ trunk/libquota-perl/debian/changelog Tue Dec 18 07:32:38 2007
@@ -1,13 +1,25 @@
-libquota-perl (1.6.0+dfsg-1) UNRELEASED; urgency=low
+libquota-perl (1.6.1+dfsg-1) UNRELEASED; urgency=low
 
   UNCLEAR LICENSE FOR afsquota.c (RT#28599)
+   - it's clear for GPL/Artistic  to have a "contributed" stanza
+     instead a "copyright" one ?
+
+  [ Gregor Herrmann ]
   
   * New upstream release.
   * debian/control: Added: Vcs-Svn field (source stanza); Vcs-Browser
     field (source stanza). Removed: XS-Vcs-Svn fields.
   * Add copyright information for afsquota.c to debian/copyright.
 
- -- gregor herrmann <gregor+debian at comodo.priv.at>  Sun, 14 Oct 2007 18:11:17 +0200
+
+  [ Rene Mayorga ]
+
+  * New upstream release
+  * Bump Standards-version to 3.7.3 (no changes requiered)
+  * Adding install-stamp
+  * Remove copyright info from afsquota.c
+
+ -- Rene Mayorga <rmayorga at debian.org.sv>  Mon, 17 Dec 2007 23:47:15 -0600
 
 libquota-perl (1.5.2+dfsg-1) unstable; urgency=low
 

Modified: trunk/libquota-perl/debian/control
URL: http://svn.debian.org/wsvn/trunk/libquota-perl/debian/control?rev=11367&op=diff
==============================================================================
--- trunk/libquota-perl/debian/control (original)
+++ trunk/libquota-perl/debian/control Tue Dec 18 07:32:38 2007
@@ -5,7 +5,7 @@
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
 Uploaders: Rene Mayorga <rmayorga at debian.org.sv>,
  Damyan Ivanov <dmn at debian.org>, gregor herrmann <gregor+debian at comodo.priv.at>
-Standards-Version: 3.7.2
+Standards-Version: 3.7.3
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libquota-perl/
 Vcs-Browser: http://svn.debian.org/wsvn/pkg-perl/trunk/libquota-perl/
 Homepage: http://search.cpan.org/dist/Quota/

Modified: trunk/libquota-perl/debian/copyright
URL: http://svn.debian.org/wsvn/trunk/libquota-perl/debian/copyright?rev=11367&op=diff
==============================================================================
--- trunk/libquota-perl/debian/copyright (original)
+++ trunk/libquota-perl/debian/copyright Tue Dec 18 07:32:38 2007
@@ -29,8 +29,3 @@
    Full copy of the License can be found at
    /usr/share/common-licenses/GPL-2
 
-file ./afsquota.c:
-
-	 Copyright 1998,2003 Wolfgang Friebel <friebel at ifh.de>
-
-/* LICENSE? */

Modified: trunk/libquota-perl/debian/rules
URL: http://svn.debian.org/wsvn/trunk/libquota-perl/debian/rules?rev=11367&op=diff
==============================================================================
--- trunk/libquota-perl/debian/rules (original)
+++ trunk/libquota-perl/debian/rules Tue Dec 18 07:32:38 2007
@@ -35,17 +35,17 @@
 clean: unpatch
 	dh_testdir
 	dh_testroot
-	rm -f build-stamp
+	dh_clean build-stamp stamp-stamp
 	[ ! -f Makefile ] || $(MAKE) distclean
-	dh_clean
 
-install: 
+install: install-stamp
+install-stamp: 
 	dh_testdir
 	dh_testroot
 	dh_clean -k
 	$(MAKE) install PREFIX=$(TMP)/usr
 	rmdir --ignore-fail-on-non-empty --parents $(TMP)/usr/share/perl5
-
+	touch $@
 
 
 # Build architecture-independent files here.

Modified: trunk/libquota-perl/hints/bsd.h
URL: http://svn.debian.org/wsvn/trunk/libquota-perl/hints/bsd.h?rev=11367&op=diff
==============================================================================
--- trunk/libquota-perl/hints/bsd.h (original)
+++ trunk/libquota-perl/hints/bsd.h Tue Dec 18 07:32:38 2007
@@ -17,6 +17,13 @@
 #include <sys/mount.h>
 #include <fstab.h>
 #include <ufs/ufs/quota.h>
+
+#if defined(__NetBSD__) && (__NetBSD_Version__ >= 299000900) /* NetBSD 2.99.9 */
+/* NetBSD 3.0 has no statfs anymore */
+#include <sys/types.h>
+#include <sys/statvfs.h>
+#define HAVE_STATVFS
+#endif
 
 #include <rpc/rpc.h>
 #include <rpc/pmap_prot.h>
@@ -45,8 +52,12 @@
 
 #define MY_XDR
 
+#if defined (EXT_RQUOTAVERS)
+#define USE_EXT_RQUOTA  /* RPC version 2 aka extended quota RPC */
+#endif
+
 #define NO_MNTENT
- 
+
 #define GQR_STATUS status
 #define GQR_RQUOTA getquota_rslt_u.gqr_rquota
 

Modified: trunk/libquota-perl/hints/linux.h
URL: http://svn.debian.org/wsvn/trunk/libquota-perl/hints/linux.h?rev=11367&op=diff
==============================================================================
--- trunk/libquota-perl/hints/linux.h (original)
+++ trunk/libquota-perl/hints/linux.h Tue Dec 18 07:32:38 2007
@@ -85,6 +85,12 @@
 /* uncomment this is you're using NFS with a version of the quota tools < 3.0 */
 /* #define LINUX_RQUOTAD_BUG */
 
+/* enable support for extended quota RPC (i.e. quota RPC version 2) */
+/* note: could also be enabled by defining MY_XDR (and including "include/rquota.h") */
+#if defined (EXT_RQUOTAVERS)
+#define USE_EXT_RQUOTA
+#endif
+
 /* optional: for support of SGI XFS file systems - comment out if not needed */
 #define SGI_XFS
 #define QX_DIV(X) ((X) >> 1)

Modified: trunk/libquota-perl/include/rquota.h
URL: http://svn.debian.org/wsvn/trunk/libquota-perl/include/rquota.h?rev=11367&op=diff
==============================================================================
--- trunk/libquota-perl/include/rquota.h (original)
+++ trunk/libquota-perl/include/rquota.h Tue Dec 18 07:32:38 2007
@@ -1,16 +1,8 @@
-/*
- * Please do not edit this file.
- * It was generated using rpcgen.
- */
 
 #ifndef _RQUOTA_H_RPCGEN
 #define	_RQUOTA_H_RPCGEN
 
 #include <rpc/rpc.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
 
 #define	RQ_PATHLEN 1024
 
@@ -19,6 +11,15 @@
 	int gqa_uid;
 };
 typedef struct getquota_args getquota_args;
+
+#ifdef USE_EXT_RQUOTA
+struct ext_getquota_args {
+        char *gqa_pathp;
+        int gqa_id;
+        int gqa_type;
+};
+typedef struct ext_getquota_args ext_getquota_args;
+#endif
 
 struct rquota {
 	int rq_bsize;
@@ -52,7 +53,6 @@
 #define	RQUOTAPROG ((unsigned long)(100011))
 #define	RQUOTAVERS ((unsigned long)(1))
 
-#if defined(__STDC__) || defined(__cplusplus)
 #define	RQUOTAPROC_GETQUOTA ((unsigned long)(1))
 extern  getquota_rslt * rquotaproc_getquota_1(getquota_args *, CLIENT *);
 extern  getquota_rslt * rquotaproc_getquota_1_svc(getquota_args *, struct svc_req *);
@@ -61,34 +61,16 @@
 extern  getquota_rslt * rquotaproc_getactivequota_1_svc(getquota_args *, struct svc_req *);
 extern int rquotaprog_1_freeresult(SVCXPRT *, xdrproc_t, caddr_t);
 
-#else /* K&R C */
-#define	RQUOTAPROC_GETQUOTA ((unsigned long)(1))
-extern  getquota_rslt * rquotaproc_getquota_1();
-extern  getquota_rslt * rquotaproc_getquota_1_svc();
-#define	RQUOTAPROC_GETACTIVEQUOTA ((unsigned long)(2))
-extern  getquota_rslt * rquotaproc_getactivequota_1();
-extern  getquota_rslt * rquotaproc_getactivequota_1_svc();
-extern int rquotaprog_1_freeresult();
-#endif /* K&R C */
-
 /* the xdr functions */
 
-#if defined(__STDC__) || defined(__cplusplus)
 extern  bool_t xdr_getquota_args(XDR *, getquota_args*);
 extern  bool_t xdr_rquota(XDR *, rquota*);
 extern  bool_t xdr_gqr_status(XDR *, gqr_status*);
 extern  bool_t xdr_getquota_rslt(XDR *, getquota_rslt*);
 
-#else /* K&R C */
-extern bool_t xdr_getquota_args();
-extern bool_t xdr_rquota();
-extern bool_t xdr_gqr_status();
-extern bool_t xdr_getquota_rslt();
-
-#endif /* K&R C */
-
-#ifdef __cplusplus
-}
+#ifdef USE_EXT_RQUOTA
+#define	EXT_RQUOTAVERS ((unsigned long)(2))
+extern  bool_t xdr_ext_getquota_args(XDR *, ext_getquota_args*);
 #endif
 
 #endif /* !_RQUOTA_H_RPCGEN */




More information about the Pkg-perl-cvs-commits mailing list