Remove the $ENV{PERL_CORE} boilerplate from DynaLoader's tests.
[p5sagit/p5-mst-13.2.git] / vms / vmsish.h
index a9452eb..95ac23b 100644 (file)
@@ -1,13 +1,14 @@
-/*  vmsish.h
+/*    vmsish.h
  *
- * VMS-specific C header file for perl5.
+ *    VMS-specific C header file for perl5.
  *
- * revised: 16-Sep-1998 by Charles Bailey  bailey@newman.upenn.edu
- * Version: 5.5.2
+ *    Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+ *    2002, 2003, 2004, 2005, 2006, 2007 by Charles Bailey and others.
  *
- * Last revised: 10-Oct-2005 by John Malmberg (HP OpenVMS) wb8twy@qsl.net
- *                          Add SYMLINK support, and updated Craig Berry's
- *                          largefile support.
+ *    You may distribute under the terms of either the GNU General Public
+ *    License or the Artistic License, as specified in the README file.
+ *
+ *    Please see Changes*.* or the Perl Repository Browser for revision history.
  */
 
 #ifndef __vmsish_h_included
 #define vms_image_init Perl_vms_image_init
 #define my_tmpfile             Perl_my_tmpfile
 #define vmstrnenv              Perl_vmstrnenv            
+#define my_fgetname(a, b)      Perl_my_fgetname(a, b)
 #if !defined(PERL_IMPLICIT_CONTEXT)
 #define my_getenv_len          Perl_my_getenv_len
 #define vmssetenv              Perl_vmssetenv
 #define my_getpwent()          Perl_my_getpwent(aTHX)
 #define my_endpwent()          Perl_my_endpwent(aTHX)
 #define my_getlogin            Perl_my_getlogin
+#ifdef HAS_SYMLINK
+#  define my_symlink(a, b)     Perl_my_symlink(aTHX_ a, b)
+#endif
 #define init_os_extras         Perl_init_os_extras
 #define vms_realpath(a, b, c)  Perl_vms_realpath(aTHX_ a,b,c)
+#define vms_realname(a, b, c)  Perl_vms_realname(aTHX_ a,b,c)
 #define vms_case_tolerant(a)   Perl_vms_case_tolerant(a)
 
 /* Delete if at all possible, changing protections if necessary. */
 #define HINT_M_VMSISH_TIME     0x80000000 /* times are local, not UTC */
 #define NATIVE_HINTS           (PL_hints >> HINT_V_VMSISH)  /* used in op.c */
 
-#define TEST_VMSISH(h) (PL_curcop->op_private & ((h) >> HINT_V_VMSISH))
+#ifdef PERL_IMPLICIT_CONTEXT
+#  define TEST_VMSISH(h)       (my_perl && PL_curcop && (PL_curcop->op_private & ((h) >> HINT_V_VMSISH)))
+#else
+#  define TEST_VMSISH(h)       (PL_curcop && (PL_curcop->op_private & ((h) >> HINT_V_VMSISH)))
+#endif
 #define VMSISH_STATUS  TEST_VMSISH(HINT_M_VMSISH_STATUS)
 #define VMSISH_TIME    TEST_VMSISH(HINT_M_VMSISH_TIME)
 
@@ -402,13 +412,18 @@ struct interp_intern {
 #else
 #define BIT_BUCKET "/dev/null"
 #endif
-#define PERL_SYS_INIT(c,v)     MALLOC_CHECK_TAINT2(*c,*v) vms_image_init((c),(v)); PERLIO_INIT; MALLOC_INIT
-#define PERL_SYS_TERM()                HINTS_REFCNT_TERM; OP_REFCNT_TERM; PERLIO_TERM; MALLOC_TERM
+#define PERL_SYS_INIT_BODY(c,v)        MALLOC_CHECK_TAINT2(*c,*v) vms_image_init((c),(v)); PERLIO_INIT; MALLOC_INIT
+#define PERL_SYS_TERM_BODY()           HINTS_REFCNT_TERM; OP_REFCNT_TERM; PERLIO_TERM; MALLOC_TERM
 #define dXSUB_SYS
 #define HAS_KILL
 #define HAS_WAIT
 
-#define PERL_FS_VER_FMT                "%d_%d_%d"
+#ifndef PERL_CORE
+#  define PERL_FS_VER_FMT      "%d_%d_%d"
+#endif
+#define PERL_FS_VERSION                STRINGIFY(PERL_REVISION) "_" \
+                               STRINGIFY(PERL_VERSION) "_" \
+                               STRINGIFY(PERL_SUBVERSION)
 /* Temporary; we need to add support for this to Configure.Com */
 #ifdef PERL_INC_VERSION_LIST
 #  undef PERL_INC_VERSION_LIST
@@ -444,7 +459,11 @@ struct interp_intern {
  *     getgrgid() routines are available to get group entries.
  *     The getgrent() has a separate definition, HAS_GETGRENT.
  */
+#if __CRTL_VER >= 70302000
+#define HAS_GROUP              /**/
+#else
 #undef HAS_GROUP               /**/
+#endif
 
 /* HAS_PASSWD
  *     This symbol, if defined, indicates that the getpwnam() and
@@ -507,6 +526,10 @@ struct interp_intern {
 #  define fwrite my_fwrite     /* for PerlSIO_fwrite */
 #  define fdopen my_fdopen
 #  define fclose my_fclose
+#  define fgetname(a, b) my_fgetname(a, b)
+#ifdef HAS_SYMLINK
+#  define symlink my_symlink
+#endif
 #endif
 
 
@@ -954,11 +977,13 @@ int       Perl_flex_lstat (pTHX_ const char *, Stat_t *);
 int    Perl_flex_stat (pTHX_ const char *, Stat_t *);
 int    my_vfork (void);
 bool   Perl_vms_do_exec (pTHX_ const char *);
-unsigned long int      Perl_do_aspawn (pTHX_ void *, void **, void **);
-unsigned long int      Perl_do_spawn (pTHX_ const char *);
 FILE *  my_fdopen (int, const char *);
 int     my_fclose (FILE *);
-int    my_fwrite (const void *, size_t, size_t, FILE *);
+int     my_fwrite (const void *, size_t, size_t, FILE *);
+char *  Perl_my_fgetname (FILE *fp, char *buf);
+#ifdef HAS_SYMLINK
+int     Perl_my_symlink(pTHX_ const char *path1, const char *path2);
+#endif
 int    Perl_my_flush (pTHX_ FILE *);
 struct passwd *        Perl_my_getpwnam (pTHX_ const char *name);
 struct passwd *        Perl_my_getpwuid (pTHX_ Uid_t uid);