3 * Copyright (C) 1991, 1992, 1993, 1999, 2001, 2002, 2003, 2004, 2005,
4 * 2007, by Larry Wall and others
6 * You may distribute under the terms of either the GNU General Public
7 * License or the Artistic License, as specified in the README file.
12 # define PERL_FILE_IS_ABSOLUTE(f) \
15 || ((*(f) == '[' || *(f) == '<') \
16 && (isWORDCHAR((f)[1]) || strchr("$-_]>",(f)[1])))))
19 # if defined(WIN32) || defined(__CYGWIN__)
20 # define PERL_FILE_IS_ABSOLUTE(f) \
21 (*(f) == '/' || *(f) == '\\' /* UNC/rooted path */ \
22 || ((f)[0] && (f)[1] == ':')) /* drive name */
25 # define PERL_FILE_IS_ABSOLUTE(f) \
26 (((f)[0] && (f)[1] == ':') /* drive name */ \
27 || ((f)[0] == '\\' && (f)[1] == '\\') /* UNC path */ \
28 || ((f)[3] == ':')) /* volume name, currently only sys */
30 # if defined(DOSISH) || defined(__SYMBIAN32__)
31 # define PERL_FILE_IS_ABSOLUTE(f) \
33 || ((f)[0] && (f)[1] == ':')) /* drive name */
34 # else /* NEITHER DOSISH NOR SYMBIANISH */
35 # define PERL_FILE_IS_ABSOLUTE(f) (*(f) == '/')
42 =head1 Miscellaneous Functions
46 This is a synonym for (! foldEQ())
48 =for apidoc ibcmp_locale
50 This is a synonym for (! foldEQ_locale())
54 #define ibcmp(s1, s2, len) cBOOL(! foldEQ(s1, s2, len))
55 #define ibcmp_locale(s1, s2, len) cBOOL(! foldEQ_locale(s1, s2, len))
57 /* outside the core, perl.h undefs HAS_QUAD if IV isn't 64-bit
58 We can't swap this to HAS_QUAD, because the logic here affects the type of
59 perl_drand48_t below, and that is visible outside of the core. */
60 #if defined(U64TYPE) && !defined(USING_MSVC6)
61 /* use a faster implementation when quads are available,
62 * but not with VC6 on Windows */
63 # define PERL_DRAND48_QUAD
66 #ifdef PERL_DRAND48_QUAD
68 /* U64 is only defined under PERL_CORE, but this needs to be visible
69 * elsewhere so the definition of PerlInterpreter is complete.
71 typedef U64TYPE perl_drand48_t;
75 struct PERL_DRAND48_T {
79 typedef struct PERL_DRAND48_T perl_drand48_t;
83 #define PL_RANDOM_STATE_TYPE perl_drand48_t
85 #define Perl_drand48_init(seed) (Perl_drand48_init_r(&PL_random_state, (seed)))
86 #define Perl_drand48() (Perl_drand48_r(&PL_random_state))
90 * c-indentation-style: bsd
92 * indent-tabs-mode: nil
95 * ex: set ts=8 sts=4 sw=4 et: