|
Server : Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 System : Linux server.jackjohnson.com 2.6.32-279.5.2.el6.x86_64 #1 SMP Fri Aug 24 01:07:11 UTC 2012 x86_64 User : jackjohn ( 502) PHP Version : 5.3.17 Disable Function : NONE Directory : /installd/perl588installer/perl-5.8.8/ext/Fcntl/ |
Upload File : |
/*
* This file was generated automatically by xsubpp version 1.9508 from the
* contents of Fcntl.xs. Do not edit this file, edit Fcntl.xs instead.
*
* ANY CHANGES MADE HERE WILL BE LOST!
*
*/
#line 1 "Fcntl.xs"
#define PERL_NO_GET_CONTEXT
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#ifdef VMS
# include <file.h>
#else
#if defined(__GNUC__) && defined(__cplusplus) && defined(WIN32)
#define _NO_OLDNAMES
#endif
# include <fcntl.h>
#if defined(__GNUC__) && defined(__cplusplus) && defined(WIN32)
#undef _NO_OLDNAMES
#endif
#endif
#ifdef I_UNISTD
#include <unistd.h>
#endif
/* This comment is a kludge to get metaconfig to see the symbols
VAL_O_NONBLOCK
VAL_EAGAIN
RD_NODATA
EOF_NONBLOCK
and include the appropriate metaconfig unit
so that Configure will test how to turn on non-blocking I/O
for a file descriptor. See config.h for how to use these
in your extension.
While I'm at it, I'll have metaconfig look for HAS_POLL too.
--AD October 16, 1995
*/
#include "const-c.inc"
#line 48 "Fcntl.c"
/* INCLUDE: Including 'const-xs.inc' from 'Fcntl.xs' */
XS(XS_Fcntl_constant); /* prototype to pass -Wmissing-prototypes */
XS(XS_Fcntl_constant)
{
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Fcntl::constant(sv)");
SP -= items;
{
#line 4 "const-xs.inc"
#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 */
#line 72 "Fcntl.c"
SV * sv = ST(0);
const char * s = SvPV(sv, len);
#line 18 "const-xs.inc"
/* 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 Fcntl macro", s));
PUSHs(sv);
break;
case PERL_constant_NOTDEF:
sv = sv_2mortal(newSVpvf(
"Your vendor has not defined Fcntl 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 Fcntl macro %s, used",
type, s));
PUSHs(sv);
}
#line 147 "Fcntl.c"
PUTBACK;
return;
}
}
/* INCLUDE: Returning to 'Fcntl.xs' from 'const-xs.inc' */
#ifdef __cplusplus
extern "C"
#endif
XS(boot_Fcntl); /* prototype to pass -Wmissing-prototypes */
XS(boot_Fcntl)
{
dXSARGS;
char* file = __FILE__;
XS_VERSION_BOOTCHECK ;
newXS("Fcntl::constant", XS_Fcntl_constant, file);
XSRETURN_YES;
}