* library prototypes; we'll use our own in proto.h instead. */
#ifdef MYMALLOC
-
-# ifdef HIDEMYMALLOC
-# define malloc Mymalloc
-# define calloc Mycalloc
-# define realloc Myrealloc
-# define free Myfree
-Malloc_t Mymalloc _((MEM_SIZE nbytes));
-Malloc_t Mycalloc _((MEM_SIZE elements, MEM_SIZE size));
-Malloc_t Myrealloc _((Malloc_t where, MEM_SIZE nbytes));
-Free_t Myfree _((Malloc_t where));
-# endif
-# ifdef EMBEDMYMALLOC
-# define malloc Perl_malloc
-# define calloc Perl_calloc
-# define realloc Perl_realloc
-/* VMS' external symbols are case-insensitive, and there's already a */
-/* perl_free in perl.h */
-#ifdef VMS
-# define free Perl_myfree
-#else
-# define free Perl_free
-#endif
+# ifdef PERL_POLLUTE_MALLOC
+# define Perl_malloc malloc
+# define Perl_calloc calloc
+# define Perl_realloc realloc
+# define Perl_mfree free
+# else
+# define EMBEDMYMALLOC /* for compatibility */
+# endif
Malloc_t Perl_malloc _((MEM_SIZE nbytes));
Malloc_t Perl_calloc _((MEM_SIZE elements, MEM_SIZE size));
Malloc_t Perl_realloc _((Malloc_t where, MEM_SIZE nbytes));
-#ifdef VMS
-Free_t Perl_myfree _((Malloc_t where));
-#else
-Free_t Perl_free _((Malloc_t where));
-#endif
-# endif
-
-# undef safemalloc
-# undef safecalloc
-# undef saferealloc
-# undef safefree
-# define safemalloc malloc
-# define safecalloc calloc
-# define saferealloc realloc
-# define safefree free
-
+/* 'mfree' rather than 'free', since there is already a 'perl_free'
+ * that causes clashes with case-insensitive linkers */
+Free_t Perl_mfree _((Malloc_t where));
+
+# define safemalloc Perl_malloc
+# define safecalloc Perl_calloc
+# define saferealloc Perl_realloc
+# define safefree Perl_mfree
+#else /* MYMALLOC */
+# define safemalloc safesysmalloc
+# define safecalloc safesyscalloc
+# define saferealloc safesysrealloc
+# define safefree safesysfree
#endif /* MYMALLOC */
#if defined(STANDARD_C) && defined(I_STDDEF)
#ifndef Quad_t
# if LONGSIZE == 8
# define Quad_t long
+# define Uquad_t unsigned long
# define PERL_QUAD_IS_LONG
# endif
#endif
#ifndef Quad_t
# if INTSIZE == 8
# define Quad_t int
+# define Uquad_t unsigned int
# define PERL_QUAD_IS_INT
# endif
#endif
# ifdef USE_LONG_LONG /* See above note about LP32. --jhi */
# if defined(HAS_LONG_LONG) && LONGLONGSIZE == 8
# define Quad_t long long
+# define Uquad_t unsigned long long
# define PERL_QUAD_IS_LONG_LONG
# endif
# endif
#ifdef Quad_t
# define HAS_QUAD
# ifndef Uquad_t
- /* Note that if your Quad_t is a typedef you *must* have defined
- * also Uquad_t yourself because 'unsigned type' is illegal. */
+ /* Note that if your Quad_t is a typedef (not a #define) you *MUST*
+ * have defined by now Uquad_t yourself because 'unsigned type'
+ * is illegal. */
# define Uquad_t unsigned Quad_t
# endif
#endif
# endif
#endif
+#ifndef MAXPATHLEN
+# ifdef PATH_MAX
+# ifdef _POSIX_PATH_MAX
+# if PATH_MAX > _POSIX_PATH_MAX
+/* MAXPATHLEN is supposed to include the final null character,
+ * as opposed to PATH_MAX and _POSIX_PATH_MAX. */
+# define MAXPATHLEN (PATH_MAX+1)
+# else
+# define MAXPATHLEN (_POSIX_PATH_MAX+1)
+# endif
+# else
+# define MAXPATHLEN (PATH_MAX+1)
+# endif
+# else
+# ifdef _POSIX_PATH_MAX
+# define MAXPATHLEN (_POSIX_PATH_MAX+1)
+# else
+# define MAXPATHLEN 1024 /* Err on the large side. */
+# endif
+# endif
+#endif
+
#ifndef FUNC_NAME_TO_PTR
#define FUNC_NAME_TO_PTR(name) name
#endif
# else
# ifdef I_MACH_CTHREADS
# include <mach/cthreads.h>
+# ifdef NeXT
+# define MUTEX_INIT_CALLS_MALLOC
+# endif
typedef cthread_t perl_os_thread;
typedef mutex_t perl_mutex;
typedef condition_t perl_cond;
#endif /* USE_THREADS */
/* Work around some cygwin32 problems with importing global symbols */
-#if defined(CYGWIN32) && defined(DLLIMPORT)
+#if defined(CYGWIN32)
+# if defined(DLLIMPORT)
# include "cw32imp.h"
+# endif
+/* USEMYBINMODE
+ * This symbol, if defined, indicates that the program should
+ * use the routine my_binmode(FILE *fp, char iotype) to insure
+ * that a file is in "binary" mode -- that is, that no translation
+ * of bytes occurs on read or write operations.
+ */
+# define USEMYBINMODE / **/
+# define my_binmode(fp, iotype) \
+ (PerlLIO_setmode(PerlIO_fileno(fp), O_BINARY) != -1 ? TRUE : NULL)
#endif
#include "regexp.h"
Gid_t getegid _((void));
#endif
-#ifdef DEBUGGING
#ifndef Perl_debug_log
#define Perl_debug_log PerlIO_stderr()
#endif
+
+#ifdef DEBUGGING
#undef YYDEBUG
#define YYDEBUG 1
#define DEB(a) a
#define UNLINK unlnk
I32 unlnk _((char*));
#else
-#define UNLINK unlink
+#define UNLINK PerlLIO_unlink
#endif
#ifndef HAS_SETREUID
#endif
#ifdef MYMALLOC
-# ifdef I_MACH_CTHREADS
+# ifdef MUTEX_INIT_CALLS_MALLOC
# define MALLOC_INIT \
STMT_START { \
PL_malloc_mutex = NULL; \
EXTCONST char PL_no_myglob[]
INIT("\"my\" variable %s can't be in a package");
+EXTCONST char PL_uuemap[65]
+ INIT("`!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_");
+
+
#ifdef DOINIT
EXT char *PL_sig_name[] = { SIG_NAME };
EXT int PL_sig_num[] = { SIG_NUM };
want_vtbl_regdatum
};
-
/* Note: the lowest 8 bits are reserved for
stuffing into op->op_private */
#define HINT_INTEGER 0x00000001
# endif
#endif
+/* Mention
+
+ INSTALL_USR_BIN_PERL
+
+ I_SYS_MMAN
+ HAS_MMAP
+ HAS_MUNMAP
+ HAS_MPROTECT
+ HAS_MSYNC
+ HAS_MADVISE
+ Mmap_t
+
+ here so that Configure picks them up. */
+
+#ifdef IAMSUID
+
+#ifdef I_SYS_STATVFS
+# include <sys/statvfs.h> /* for f?statvfs() */
+#endif
+#ifdef I_SYS_MOUNT
+# include <sys/mount.h> /* for *BSD f?statfs() */
+#endif
+#ifdef I_MNTENT
+# include <mntent.h> /* for getmntent() */
+#endif
+
+#endif /* IAMSUID */
+
#endif /* Include guard */