r40219 - in /trunk/libio-epoll-perl: const-c.inc const-xs.inc debian/ debian/changelog debian/compat debian/control debian/copyright debian/rules debian/watch

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Mon Jul 20 00:17:21 UTC 2009


Author: jawnsy-guest
Date: Mon Jul 20 00:17:15 2009
New Revision: 40219

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=40219
Log:
[svn-inject] Applying Debian modifications to trunk

Added:
    trunk/libio-epoll-perl/const-c.inc
    trunk/libio-epoll-perl/const-xs.inc
    trunk/libio-epoll-perl/debian/
    trunk/libio-epoll-perl/debian/changelog
    trunk/libio-epoll-perl/debian/compat
    trunk/libio-epoll-perl/debian/control
    trunk/libio-epoll-perl/debian/copyright
    trunk/libio-epoll-perl/debian/rules   (with props)
    trunk/libio-epoll-perl/debian/watch

Added: trunk/libio-epoll-perl/const-c.inc
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libio-epoll-perl/const-c.inc?rev=40219&op=file
==============================================================================
--- trunk/libio-epoll-perl/const-c.inc (added)
+++ trunk/libio-epoll-perl/const-c.inc Mon Jul 20 00:17:15 2009
@@ -1,0 +1,256 @@
+#define PERL_constant_NOTFOUND	1
+#define PERL_constant_NOTDEF	2
+#define PERL_constant_ISIV	3
+#define PERL_constant_ISNO	4
+#define PERL_constant_ISNV	5
+#define PERL_constant_ISPV	6
+#define PERL_constant_ISPVN	7
+#define PERL_constant_ISSV	8
+#define PERL_constant_ISUNDEF	9
+#define PERL_constant_ISUV	10
+#define PERL_constant_ISYES	11
+
+#ifndef NVTYPE
+typedef double NV; /* 5.6 and later define NVTYPE, and typedef NV to it.  */
+#endif
+#ifndef aTHX_
+#define aTHX_ /* 5.6 or later define this for threading support.  */
+#endif
+#ifndef pTHX_
+#define pTHX_ /* 5.6 or later define this for threading support.  */
+#endif
+
+static int
+constant_8 (pTHX_ const char *name, IV *iv_return) {
+  /* When generated this function returned values for the list of names given
+     here.  However, subsequent manual editing may have added or removed some.
+     EPOLLERR EPOLLHUP EPOLLMSG EPOLLOUT EPOLLPRI */
+  /* Offset 5 gives the best switch position.  */
+  switch (name[5]) {
+  case 'E':
+    if (memEQ(name, "EPOLLERR", 8)) {
+    /*                    ^        */
+#ifdef EPOLLERR
+      *iv_return = EPOLLERR;
+      return PERL_constant_ISIV;
+#else
+      return PERL_constant_NOTDEF;
+#endif
+    }
+    break;
+  case 'H':
+    if (memEQ(name, "EPOLLHUP", 8)) {
+    /*                    ^        */
+#ifdef EPOLLHUP
+      *iv_return = EPOLLHUP;
+      return PERL_constant_ISIV;
+#else
+      return PERL_constant_NOTDEF;
+#endif
+    }
+    break;
+  case 'M':
+    if (memEQ(name, "EPOLLMSG", 8)) {
+    /*                    ^        */
+#ifdef EPOLLMSG
+      *iv_return = EPOLLMSG;
+      return PERL_constant_ISIV;
+#else
+      return PERL_constant_NOTDEF;
+#endif
+    }
+    break;
+  case 'O':
+    if (memEQ(name, "EPOLLOUT", 8)) {
+    /*                    ^        */
+#ifdef EPOLLOUT
+      *iv_return = EPOLLOUT;
+      return PERL_constant_ISIV;
+#else
+      return PERL_constant_NOTDEF;
+#endif
+    }
+    break;
+  case 'P':
+    if (memEQ(name, "EPOLLPRI", 8)) {
+    /*                    ^        */
+#ifdef EPOLLPRI
+      *iv_return = EPOLLPRI;
+      return PERL_constant_ISIV;
+#else
+      return PERL_constant_NOTDEF;
+#endif
+    }
+    break;
+  }
+  return PERL_constant_NOTFOUND;
+}
+
+static int
+constant_11 (pTHX_ const char *name, IV *iv_return) {
+  /* When generated this function returned values for the list of names given
+     here.  However, subsequent manual editing may have added or removed some.
+     EPOLLRDBAND EPOLLRDNORM EPOLLWRBAND EPOLLWRNORM */
+  /* Offset 9 gives the best switch position.  */
+  switch (name[9]) {
+  case 'N':
+    if (memEQ(name, "EPOLLRDBAND", 11)) {
+    /*                        ^        */
+#ifdef EPOLLRDBAND
+      *iv_return = EPOLLRDBAND;
+      return PERL_constant_ISIV;
+#else
+      return PERL_constant_NOTDEF;
+#endif
+    }
+    if (memEQ(name, "EPOLLWRBAND", 11)) {
+    /*                        ^        */
+#ifdef EPOLLWRBAND
+      *iv_return = EPOLLWRBAND;
+      return PERL_constant_ISIV;
+#else
+      return PERL_constant_NOTDEF;
+#endif
+    }
+    break;
+  case 'R':
+    if (memEQ(name, "EPOLLRDNORM", 11)) {
+    /*                        ^        */
+#ifdef EPOLLRDNORM
+      *iv_return = EPOLLRDNORM;
+      return PERL_constant_ISIV;
+#else
+      return PERL_constant_NOTDEF;
+#endif
+    }
+    if (memEQ(name, "EPOLLWRNORM", 11)) {
+    /*                        ^        */
+#ifdef EPOLLWRNORM
+      *iv_return = EPOLLWRNORM;
+      return PERL_constant_ISIV;
+#else
+      return PERL_constant_NOTDEF;
+#endif
+    }
+    break;
+  }
+  return PERL_constant_NOTFOUND;
+}
+
+static int
+constant_13 (pTHX_ const char *name, IV *iv_return) {
+  /* When generated this function returned values for the list of names given
+     here.  However, subsequent manual editing may have added or removed some.
+     EPOLL_CTL_ADD EPOLL_CTL_DEL EPOLL_CTL_MOD */
+  /* Offset 11 gives the best switch position.  */
+  switch (name[11]) {
+  case 'D':
+    if (memEQ(name, "EPOLL_CTL_ADD", 13)) {
+    /*                          ^        */
+#ifdef EPOLL_CTL_ADD
+      *iv_return = EPOLL_CTL_ADD;
+      return PERL_constant_ISIV;
+#else
+      return PERL_constant_NOTDEF;
+#endif
+    }
+    break;
+  case 'E':
+    if (memEQ(name, "EPOLL_CTL_DEL", 13)) {
+    /*                          ^        */
+#ifdef EPOLL_CTL_DEL
+      *iv_return = EPOLL_CTL_DEL;
+      return PERL_constant_ISIV;
+#else
+      return PERL_constant_NOTDEF;
+#endif
+    }
+    break;
+  case 'O':
+    if (memEQ(name, "EPOLL_CTL_MOD", 13)) {
+    /*                          ^        */
+#ifdef EPOLL_CTL_MOD
+      *iv_return = EPOLL_CTL_MOD;
+      return PERL_constant_ISIV;
+#else
+      return PERL_constant_NOTDEF;
+#endif
+    }
+    break;
+  }
+  return PERL_constant_NOTFOUND;
+}
+
+static int
+constant (pTHX_ const char *name, STRLEN len, IV *iv_return) {
+  /* Initially switch on the length of the name.  */
+  /* When generated this function returned values for the list of names given
+     in this section of perl code.  Rather than manually editing these functions
+     to add or remove constants, which would result in this comment and section
+     of code becoming inaccurate, we recommend that you edit this section of
+     code, and use it to regenerate a new set of constant functions which you
+     then use to replace the originals.
+
+     Regenerate these constant functions by feeding this entire source file to
+     perl -x
+
+#!/usr/bin/perl -w
+use ExtUtils::Constant qw (constant_types C_constant XS_constant);
+
+my $types = {map {($_, 1)} qw(IV)};
+my @names = (qw(EPOLLERR EPOLLET EPOLLHUP EPOLLIN EPOLLMSG EPOLLOUT EPOLLPRI
+	       EPOLLRDBAND EPOLLRDNORM EPOLLWRBAND EPOLLWRNORM EPOLL_CTL_ADD
+	       EPOLL_CTL_DEL EPOLL_CTL_MOD));
+
+print constant_types(), "\n"; # macro defs
+foreach (C_constant ("IO::Epoll", 'constant', 'IV', $types, undef, 3, @names) ) {
+    print $_, "\n"; # C constant subs
+}
+print "\n#### XS Section:\n";
+print XS_constant ("IO::Epoll", $types);
+__END__
+   */
+
+  switch (len) {
+  case 7:
+    /* Names all of length 7.  */
+    /* EPOLLET EPOLLIN */
+    /* Offset 5 gives the best switch position.  */
+    switch (name[5]) {
+    case 'E':
+      if (memEQ(name, "EPOLLET", 7)) {
+      /*                    ^       */
+#ifdef EPOLLET
+        *iv_return = EPOLLET;
+        return PERL_constant_ISIV;
+#else
+        return PERL_constant_NOTDEF;
+#endif
+      }
+      break;
+    case 'I':
+      if (memEQ(name, "EPOLLIN", 7)) {
+      /*                    ^       */
+#ifdef EPOLLIN
+        *iv_return = EPOLLIN;
+        return PERL_constant_ISIV;
+#else
+        return PERL_constant_NOTDEF;
+#endif
+      }
+      break;
+    }
+    break;
+  case 8:
+    return constant_8 (aTHX_ name, iv_return);
+    break;
+  case 11:
+    return constant_11 (aTHX_ name, iv_return);
+    break;
+  case 13:
+    return constant_13 (aTHX_ name, iv_return);
+    break;
+  }
+  return PERL_constant_NOTFOUND;
+}
+

Added: trunk/libio-epoll-perl/const-xs.inc
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libio-epoll-perl/const-xs.inc?rev=40219&op=file
==============================================================================
--- trunk/libio-epoll-perl/const-xs.inc (added)
+++ trunk/libio-epoll-perl/const-xs.inc Mon Jul 20 00:17:15 2009
@@ -1,0 +1,90 @@
+void
+constant(sv)
+    PREINIT:
+#ifdef dXSTARG
+	dXSTARG; /* Faster if we have it.  */
+#else
+	dTARGET;
+#endif
+	STRLEN		len;
+        int		type;
+	IV		iv;
+	/* NV		nv;	Uncomment this if you need to return NVs */
+	/* const char	*pv;	Uncomment this if you need to return PVs */
+    INPUT:
+	SV *		sv;
+        const char *	s = SvPV(sv, len);
+    PPCODE:
+        /* Change this to constant(aTHX_ s, len, &iv, &nv);
+           if you need to return both NVs and IVs */
+	type = constant(aTHX_ s, len, &iv);
+      /* Return 1 or 2 items. First is error message, or undef if no error.
+           Second, if present, is found value */
+        switch (type) {
+        case PERL_constant_NOTFOUND:
+          sv =
+	    sv_2mortal(newSVpvf("%s is not a valid IO::Epoll macro", s));
+          PUSHs(sv);
+          break;
+        case PERL_constant_NOTDEF:
+          sv = sv_2mortal(newSVpvf(
+	    "Your vendor has not defined IO::Epoll macro %s, used",
+				   s));
+          PUSHs(sv);
+          break;
+        case PERL_constant_ISIV:
+          EXTEND(SP, 1);
+          PUSHs(&PL_sv_undef);
+          PUSHi(iv);
+          break;
+	/* Uncomment this if you need to return NOs
+        case PERL_constant_ISNO:
+          EXTEND(SP, 1);
+          PUSHs(&PL_sv_undef);
+          PUSHs(&PL_sv_no);
+          break; */
+	/* Uncomment this if you need to return NVs
+        case PERL_constant_ISNV:
+          EXTEND(SP, 1);
+          PUSHs(&PL_sv_undef);
+          PUSHn(nv);
+          break; */
+	/* Uncomment this if you need to return PVs
+        case PERL_constant_ISPV:
+          EXTEND(SP, 1);
+          PUSHs(&PL_sv_undef);
+          PUSHp(pv, strlen(pv));
+          break; */
+	/* Uncomment this if you need to return PVNs
+        case PERL_constant_ISPVN:
+          EXTEND(SP, 1);
+          PUSHs(&PL_sv_undef);
+          PUSHp(pv, iv);
+          break; */
+	/* Uncomment this if you need to return SVs
+        case PERL_constant_ISSV:
+          EXTEND(SP, 1);
+          PUSHs(&PL_sv_undef);
+          PUSHs(sv);
+          break; */
+	/* Uncomment this if you need to return UNDEFs
+        case PERL_constant_ISUNDEF:
+          break; */
+	/* Uncomment this if you need to return UVs
+        case PERL_constant_ISUV:
+          EXTEND(SP, 1);
+          PUSHs(&PL_sv_undef);
+          PUSHu((UV)iv);
+          break; */
+	/* Uncomment this if you need to return YESs
+        case PERL_constant_ISYES:
+          EXTEND(SP, 1);
+          PUSHs(&PL_sv_undef);
+          PUSHs(&PL_sv_yes);
+          break; */
+        default:
+          sv = sv_2mortal(newSVpvf(
+	    "Unexpected return type %d while processing IO::Epoll macro %s, used",
+               type, s));
+          PUSHs(sv);
+        }

Added: trunk/libio-epoll-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libio-epoll-perl/debian/changelog?rev=40219&op=file
==============================================================================
--- trunk/libio-epoll-perl/debian/changelog (added)
+++ trunk/libio-epoll-perl/debian/changelog Mon Jul 20 00:17:15 2009
@@ -1,0 +1,5 @@
+libio-epoll-perl (0.02-1) UNRELEASED; urgency=low
+
+  * Initial Release.
+
+ -- Jonathan Yu <frequency at cpan.org>  Sun, 19 Jul 2009 16:06:46 -0400

Added: trunk/libio-epoll-perl/debian/compat
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libio-epoll-perl/debian/compat?rev=40219&op=file
==============================================================================
--- trunk/libio-epoll-perl/debian/compat (added)
+++ trunk/libio-epoll-perl/debian/compat Mon Jul 20 00:17:15 2009
@@ -1,0 +1,1 @@
+7

Added: trunk/libio-epoll-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libio-epoll-perl/debian/control?rev=40219&op=file
==============================================================================
--- trunk/libio-epoll-perl/debian/control (added)
+++ trunk/libio-epoll-perl/debian/control Mon Jul 20 00:17:15 2009
@@ -1,0 +1,22 @@
+Source: libio-epoll-perl
+Section: perl
+Priority: optional
+Build-Depends: debhelper (>= 7), perl (>= 5.6.0-12)
+Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
+Uploaders: Jonathan Yu <frequency at cpan.org>
+Standards-Version: 3.8.2
+Homepage: http://search.cpan.org/dist/IO-Epoll/
+Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libio-epoll-perl/
+Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libio-epoll-perl/
+
+Package: libio-epoll-perl
+Architecture: any
+Depends: ${perl:Depends}, ${shlibs:Depends}, ${misc:Depends}
+Description: Perl interface to the Epoll IO Multiplexing subsystem
+ IO::Epoll provides access to the new, (currently) Linux-specific variant of
+ poll() known as epoll(). It is designed to offer O(1) scalability over large
+ numbers of watched file descriptors.
+ .
+ This module provides a higher-level layer designed to emulate the behaviour
+ of IO::Poll and IO::Ppoll, but also exposes the corresponding low-level API
+ that closely matches the related system calls.

Added: trunk/libio-epoll-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libio-epoll-perl/debian/copyright?rev=40219&op=file
==============================================================================
--- trunk/libio-epoll-perl/debian/copyright (added)
+++ trunk/libio-epoll-perl/debian/copyright Mon Jul 20 00:17:15 2009
@@ -1,0 +1,36 @@
+Format-Specification:
+    http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196
+Upstream-Maintainer: Bruce J Keeler <bruce at gridpoint.com>
+Upstream-Source: http://search.cpan.org/dist/IO-Epoll/
+Upstream-Name: IO-Epoll
+
+Files: *
+Copyright: 2004, Bruce J Keeler <bruce at gridpoint.com>
+ 1997-1998, Graham Barr <gbarr at pobox.com>
+License-Alias: Perl
+License: Artistic | GPL-1+
+
+Files: debian/*
+Copyright: 2009, Jonathan Yu <frequency at cpan.org>
+License: Artistic | GPL-1+
+
+Files: ppport.h
+Copyright: 2004-2009, Marcus Holland-Moritz <mhx-cpan at gmx.net>
+ 2001, Paul Marquess <pmqs at cpan.org> (Version 2.x)
+ 1999, Kenneth Albanowski <kjahds at kjahds.com> (Version 1.x)
+License-Alias: Perl
+License: Artistic | GPL-1+
+
+License: Artistic
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the Artistic License, which comes with Perl.
+    On Debian GNU/Linux systems, the complete text of the Artistic License
+    can be found in `/usr/share/common-licenses/Artistic'
+
+License: GPL-1+
+    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 1, or (at your option)
+    any later version.
+    On Debian GNU/Linux systems, the complete text of the GNU General
+    Public License can be found in `/usr/share/common-licenses/GPL'

Added: trunk/libio-epoll-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libio-epoll-perl/debian/rules?rev=40219&op=file
==============================================================================
--- trunk/libio-epoll-perl/debian/rules (added)
+++ trunk/libio-epoll-perl/debian/rules Mon Jul 20 00:17:15 2009
@@ -1,0 +1,4 @@
+#!/usr/bin/make -f
+
+%:
+	dh $@

Propchange: trunk/libio-epoll-perl/debian/rules
------------------------------------------------------------------------------
    svn:executable = *

Added: trunk/libio-epoll-perl/debian/watch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libio-epoll-perl/debian/watch?rev=40219&op=file
==============================================================================
--- trunk/libio-epoll-perl/debian/watch (added)
+++ trunk/libio-epoll-perl/debian/watch Mon Jul 20 00:17:15 2009
@@ -1,0 +1,2 @@
+version=3
+http://search.cpan.org/dist/IO-Epoll/   .*/IO-Epoll-v?(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip)$




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