     1			/*
     2			 * This file was generated automatically by ExtUtils::ParseXS version 2.10 from the
     3			 * contents of Fcntl.xs. Do not edit this file, edit Fcntl.xs instead.
     4			 *
     5			 *	ANY CHANGES MADE HERE WILL BE LOST! 
     6			 *
     7			 */
     8			
     9			#line 1 "Fcntl.xs"
    10			#define PERL_NO_GET_CONTEXT
    11			#include "EXTERN.h"
    12			#include "perl.h"
    13			#include "XSUB.h"
    14			
    15			#ifdef VMS
    16			#  include <file.h>
    17			#else
    18			#if defined(__GNUC__) && defined(__cplusplus) && defined(WIN32)
    19			#define _NO_OLDNAMES
    20			#endif 
    21			#  include <fcntl.h>
    22			#if defined(__GNUC__) && defined(__cplusplus) && defined(WIN32)
    23			#undef _NO_OLDNAMES
    24			#endif 
    25			#endif
    26			
    27			#ifdef I_UNISTD
    28			#include <unistd.h>
    29			#endif
    30			
    31			/* This comment is a kludge to get metaconfig to see the symbols
    32			    VAL_O_NONBLOCK
    33			    VAL_EAGAIN
    34			    RD_NODATA
    35			    EOF_NONBLOCK
    36			   and include the appropriate metaconfig unit
    37			   so that Configure will test how to turn on non-blocking I/O
    38			   for a file descriptor.  See config.h for how to use these
    39			   in your extension. 
    40			   
    41			   While I'm at it, I'll have metaconfig look for HAS_POLL too.
    42			   --AD  October 16, 1995
    43			*/
    44			
    45			#include "const-c.inc"
    46			
    47			#ifndef PERL_UNUSED_VAR
    48			#  define PERL_UNUSED_VAR(var) if (0) var = var
    49			#endif
    50			
    51			#line 52 "Fcntl.c"
    52			
    53			/* INCLUDE:  Including 'const-xs.inc' from 'Fcntl.xs' */
    54			
    55			
    56			XS(XS_Fcntl_constant); /* prototype to pass -Wmissing-prototypes */
    57			XS(XS_Fcntl_constant)
    58	         262    {
    59	         262        dXSARGS;
    60	         262        if (items != 1)
    61	      ######    	Perl_croak(aTHX_ "Usage: Fcntl::constant(sv)");
    62	         262        PERL_UNUSED_VAR(cv); /* -W */
    63	         262        PERL_UNUSED_VAR(ax); /* -Wall */
    64	         262        SP -= items;
    65			    {
    66			#line 4 "Fcntl.xs"
    67			#ifdef dXSTARG
    68				dXSTARG; /* Faster if we have it.  */
    69			#else
    70				dTARGET;
    71			#endif
    72				STRLEN		len;
    73			        int		type;
    74				IV		iv;
    75				/* NV		nv;	Uncomment this if you need to return NVs */
    76				/* const char	*pv;	Uncomment this if you need to return PVs */
    77			#line 78 "Fcntl.c"
    78	         262    	SV *	sv = ST(0);
    79	         262    	const char *	s = SvPV(sv, len);
    80			#line 18 "Fcntl.xs"
    81			        /* Change this to constant(aTHX_ s, len, &iv, &nv);
    82			           if you need to return both NVs and IVs */
    83				type = constant(aTHX_ s, len, &iv);
    84			      /* Return 1 or 2 items. First is error message, or undef if no error.
    85			           Second, if present, is found value */
    86			        switch (type) {
    87			        case PERL_constant_NOTFOUND:
    88			          sv = sv_2mortal(newSVpvf("%s is not a valid Fcntl macro", s));
    89			          PUSHs(sv);
    90			          break;
    91			        case PERL_constant_NOTDEF:
    92			          sv = sv_2mortal(newSVpvf(
    93				    "Your vendor has not defined Fcntl macro %s, used", s));
    94			          PUSHs(sv);
    95			          break;
    96			        case PERL_constant_ISIV:
    97			          EXTEND(SP, 1);
    98			          PUSHs(&PL_sv_undef);
    99			          PUSHi(iv);
   100			          break;
   101				/* Uncomment this if you need to return NOs
   102			        case PERL_constant_ISNO:
   103			          EXTEND(SP, 1);
   104			          PUSHs(&PL_sv_undef);
   105			          PUSHs(&PL_sv_no);
   106			          break; */
   107				/* Uncomment this if you need to return NVs
   108			        case PERL_constant_ISNV:
   109			          EXTEND(SP, 1);
   110			          PUSHs(&PL_sv_undef);
   111			          PUSHn(nv);
   112			          break; */
   113				/* Uncomment this if you need to return PVs
   114			        case PERL_constant_ISPV:
   115			          EXTEND(SP, 1);
   116			          PUSHs(&PL_sv_undef);
   117			          PUSHp(pv, strlen(pv));
   118			          break; */
   119				/* Uncomment this if you need to return PVNs
   120			        case PERL_constant_ISPVN:
   121			          EXTEND(SP, 1);
   122			          PUSHs(&PL_sv_undef);
   123			          PUSHp(pv, iv);
   124			          break; */
   125				/* Uncomment this if you need to return SVs
   126			        case PERL_constant_ISSV:
   127			          EXTEND(SP, 1);
   128			          PUSHs(&PL_sv_undef);
   129			          PUSHs(sv);
   130			          break; */
   131				/* Uncomment this if you need to return UNDEFs
   132			        case PERL_constant_ISUNDEF:
   133			          break; */
   134				/* Uncomment this if you need to return UVs
   135			        case PERL_constant_ISUV:
   136			          EXTEND(SP, 1);
   137			          PUSHs(&PL_sv_undef);
   138			          PUSHu((UV)iv);
   139			          break; */
   140				/* Uncomment this if you need to return YESs
   141			        case PERL_constant_ISYES:
   142			          EXTEND(SP, 1);
   143			          PUSHs(&PL_sv_undef);
   144			          PUSHs(&PL_sv_yes);
   145			          break; */
   146			        default:
   147			          sv = sv_2mortal(newSVpvf(
   148				    "Unexpected return type %d while processing Fcntl macro %s, used",
   149			               type, s));
   150			          PUSHs(sv);
   151			        }
   152			#line 153 "Fcntl.c"
   153	         262    	PUTBACK;
   154				return;
   155			    }
   156			}
   157			
   158			
   159			/* INCLUDE: Returning to 'Fcntl.xs' from 'const-xs.inc' */
   160			
   161			#ifdef __cplusplus
   162			extern "C"
   163			#endif
   164			XS(boot_Fcntl); /* prototype to pass -Wmissing-prototypes */
   165			XS(boot_Fcntl)
   166	         165    {
   167	         165        dXSARGS;
   168	         165        char* file = __FILE__;
   169			
   170	         165        PERL_UNUSED_VAR(cv); /* -W */
   171	         165        PERL_UNUSED_VAR(items); /* -W */
   172	         165        XS_VERSION_BOOTCHECK ;
   173			
   174	         165            newXS("Fcntl::constant", XS_Fcntl_constant, file);
   175	         165        XSRETURN_YES;
   176			}
   177			
