summaryrefslogtreecommitdiff
path: root/perl.h
Commit message (Collapse)AuthorAgeFilesLines
* fix WinCE buildDaniel Dragan2014-10-091-0/+9
| | | | | | locale changes in 2014 broke WinCE build. localconv() doesn't exist on WinCE. locale.h from celib has to be included for setlocale()/xcesetlocale() and LC_* constants.
* [perl #122445] use magic on $DB::single etc to avoid overload issuesTony Cook2014-10-091-0/+10
| | | | | | | | | This prevents perl recursing infinitely when an overloaded object is assigned to $DB::single, $DB::trace or $DB::signal This is done by referencing their values as IVs instead of as SVs in dbstate, and by adding magic to those variables so that assignments to the scalars update the PL_DBcontrol array.
* Tru64: the socket API defines must come early.Jarkko Hietaniemi2014-10-081-8/+0
| | | | There seems to be no way around needing to select the socket API early.
* Tru64: _SOCKADDR_LEN is good.Jarkko Hietaniemi2014-10-071-8/+8
| | | | | Declare it as early as possible. The earlier position lead into getting a mix of different APIs with mismatching sockadddrs.
* Correct ‘"my" variable "&f::b"...’ messageFather Chrysostomos2014-10-051-1/+1
| | | | | | | "my" variable &foo::bar can't be in a package at - line 2, near "my sub foo::bar" It should say ‘subroutine’, not ‘variable’. When I implemented lexi- cal subs, I thought I caught all these, must I missed this one.
* Make OP_METHOD* to be of new class METHOPsyber2014-10-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a new opcode class, METHOP, which will hold class/method related info needed at runtime to improve performance of class/object method calls, then change OP_METHOD and OP_METHOD_NAMED from being UNOP/SVOP to being METHOP. Note that because OP_METHOD is a UNOP with an op_first, while OP_METHOD_NAMED is an SVOP, the first field of the METHOP structure is a union holding either op_first or op_sv. This was seen as less messy than having to introduce two new op classes. The new op class's character is '.' Nothing has changed in functionality and/or performance by this commit. It just introduces new structure which will be extended with extra fields and used in later commits. Added METHOP constructors: - newMETHOP() for method ops with dynamic method names. The only optype for this op is OP_METHOD. - newMETHOP_named() for method ops with constant method names. Optypes for this op are: OP_METHOD_NAMED (currently) and (later) OP_METHOD_SUPER, OP_METHOD_REDIR, OP_METHOD_NEXT, OP_METHOD_NEXTCAN, OP_METHOD_MAYBENEXT (This commit includes fixups by davem)
* Tru64: introduce PERL_SYS_FPU_INIT, use it.Jarkko Hietaniemi2014-09-261-0/+17
| | | | | | | In Tru64 the cc -ieee enables the IEEE math but disables traps. We need to reenable the "invalid" trap because otherwise generation of NaN values leaves the IEEE fp flags in bad state, leaving any further fp ops behaving strangely (Inf + 1 resulting in zero, for example).
* Tru64: NaN comparison quite broken.Jarkko Hietaniemi2014-09-261-3/+7
| | | | Too much Microsoft compatibility?
* Move the VC6 "broken-nan" define from win32.h to perl.h.Jarkko Hietaniemi2014-09-231-7/+6
|
* On VC6 (broken NaN compare) redefine Perl_isinf.Jarkko Hietaniemi2014-09-201-0/+7
| | | | | | | So that it works with NaN, by not using the comparison version of Perl_isinf. A little messy but since win32/win32.h is included so late in perl.h, cannot be done earlier with the other Perl_isinf logic. Partially reverts 128eeacb.
* [perl #121983] #error with ro ops and no threadsFather Chrysostomos2014-09-201-0/+4
| | | | | | | | | | | | | | PERL_DEBUG_READONLY_OPS is designed to catch modifications of op trees at run time, to make sure that perl is doing things safely under threads. (Op trees are shared between threads.) On non-threaded perls, ops are modified regularly, which is perfectly safe, so PERL_DEBUG_READONLY_OPS does not make any sense, and is guar- anteed to crash. Forcing a compilation error with cpp directives makes it obvious that it is not intended for this PERL_DEBUG_READONLY_OPS mode to work with- out USE_ITHREADS.
* quadmath NV formatted I/O.Jarkko Hietaniemi2014-09-191-0/+7
|
* quadmath interfaces and constantsJarkko Hietaniemi2014-09-191-50/+99
|
* Use the Perl_isfinite multiplication fallback last.Jarkko Hietaniemi2014-09-171-8/+5
| | | | Otherwise we shadow e.g. the Win32 _isfinite.
* [perl #122788] broken nan on win32Jarkko Hietaniemi2014-09-161-3/+5
| | | | | | Apparently VS 2003 smartly optimizes (HUGE_VAL-HUGE_VAL) into zero, so using that for NaN was quite a disaster. Let instead Win32 fall thru to the __PL_nan_u option. (HUGE_VAL for Inf is fine.)
* Define Perl_isfinite only if not already defined.Jarkko Hietaniemi2014-09-141-1/+3
|
* Use HAS_ISFINITE for Perl_isfinitel.Jarkko Hietaniemi2014-09-131-1/+1
|
* HAS_C99 comment tweak.Jarkko Hietaniemi2014-09-131-2/+5
|
* Comment tweak for HAS_C99.Jarkko Hietaniemi2014-09-121-1/+5
|
* Use the multiplication test instead of the DBL_MAX/LDBL_MAX.Jarkko Hietaniemi2014-09-121-5/+6
| | | | Comparing to decimal float constants feels unclean.
* Perl_isfinitel should not use the fpclass macross blindly.Jarkko Hietaniemi2014-09-121-2/+2
| | | | (Whether the macros are safe for long doubles, is complicated.)
* More ways to Perl_isfinitel.Jarkko Hietaniemi2014-09-111-20/+22
|
* Have a Perl_isfinitel() separate from USE_LONG_DOUBLE.Jarkko Hietaniemi2014-09-111-10/+21
| | | | (Also correct uses of HAS_C99.)
* Comment tweaks.Jarkko Hietaniemi2014-09-091-0/+4
|
* Sort the Perl_ math wrappers for easier eyeballing.Jarkko Hietaniemi2014-09-091-23/+26
|
* modfl emulation via truncl (C99) and copysignl.Jarkko Hietaniemi2014-09-071-3/+1
| | | | | (We've had emulation for broken modfl before, but it used aintl, which is not that common.)
* Long double might have INFINITYL or NANL.Jarkko Hietaniemi2014-09-061-5/+13
|
* NV_INF/NV_NAN fallback where int32 is coerced to IEEE754 float.Jarkko Hietaniemi2014-09-061-1/+33
| | | | | This is the second-to-last fallback. The last one uses explicit 1/0.0 and 0/0.0 which may cause consternation with some compilers.
* fpclass snan detection errors (cut-n-paste).Jarkko Hietaniemi2014-09-051-2/+2
|
* Use sizeof() in UNUSED_ARG and UNUSED_VAR to avoid accessing the values.Jarkko Hietaniemi2014-09-041-3/+4
| | | | The values might even be uninitialized in the case of PERL_UNUSED_VAR.
* POSIX math: have the Perl_func wrappers for the C89 math, too.Jarkko Hietaniemi2014-09-031-0/+16
| | | | (Until now the non-long-double versions have been called on long doubles.)
* isnormal macro in fp.h broken on VMS.Craig A. Berry2014-09-011-0/+3
| | | | | | | | | | | | | | | | | | | | | | | It appears to have an extra closing parenthesis, which means any use of it fails to compile. Ouch: $ type abby_normal.c #include <fp.h> int main() { double pi = 3.414; int normality = isnormal(pi); } $ cc/float=ieee abby_normal int normality = isnormal(pi); ....................^ %CC-E-NOSEMI, Missing ";". at line number 4 in file DSA23:[TEST]abby_normal.c;1 So don't use it but rather fall back to a solution based on fp_classify. Of course it's supposed to be in math.h, not fp.h, but I digress.
* Static initialization using 1/0 or 0/0 not C89.Jarkko Hietaniemi2014-09-011-2/+8
|
* Perl_isinf and Perl_isfinite fallbacks.Jarkko Hietaniemi2014-09-011-0/+8
| | | | (We have so many fallbacks that some of them probably never deploy.)
* Do not use HUGE_VAL/VALL for NV_INF.Jarkko Hietaniemi2014-09-011-9/+6
| | | | | | | | Because some platforms (like HP-UX 10.*) have HUGE_VAL as DBL_MAX, which, while large, is not quite the infinity. So have infinity own our very own. Similarly for NV_NAN.
* fix fp_classify in perl.h for VMS.Craig A. Berry2014-09-011-0/+4
| | | | | We have to include <fp.h> as well for the macros we're testing for to be defined.
* POSIX math: fpclassify continues.Jarkko Hietaniemi2014-08-311-1/+1
|
* The fp classification is a royal mess.Jarkko Hietaniemi2014-08-311-61/+102
| | | | | | Try avoiding false detections by guarding against an interface falsely matching a set of return values. This can still go wrong if <math.h> declares several sets. Would really need an array of Configure tests.
* Another way to detect C99.Jarkko Hietaniemi2014-08-301-3/+1
|
* HAS_C99 was oddly defined, and oddly used.Jarkko Hietaniemi2014-08-301-1/+5
| | | | | | It was defined as "C version high enough, but not VMS", but used as "does it have intmax_t". Now that we have I_STDINT, we can do better.
* Don't use isfinitel/isinfl/isnanl if the C99 macros exist.Jarkko Hietaniemi2014-08-281-3/+9
| | | | Moves the C99 logic from sv.c (?) to perl.h.
* *fp*class* comment tweaks.Jarkko Hietaniemi2014-08-261-2/+2
|
* Reorder the *fp*class* in preference order, add comments.Jarkko Hietaniemi2014-08-241-38/+52
| | | | | | Most importantly, try C99 fpclassify() first. Use fp_classify() and fp_classl().
* More is_inf() et alia dance.Jarkko Hietaniemi2014-08-241-17/+36
| | | | | | | Too many almost similar interfaces. Most importantly go for isinf() and isnan() if available, instead of going for the labyrinth of *fp*class* interfaces.
* Include fp.h with math.h on VMS.Craig A. Berry2014-08-231-0/+4
| | | | It has some macros that really should be in math.h according to C99.
* Fix infnan.t Win32 failure.Jarkko Hietaniemi2014-08-221-1/+15
|
* Introduce Perl_strtod (macro) to call strtold if long doubles.Jarkko Hietaniemi2014-08-221-0/+10
| | | | | | Not that much effect since strtod is now only used to parse inf/nan and then only if NV_INF + NV_NAN are missing. (Earlier strtod() returned always the double inf/nan, not the long double inf/nan.)
* Perl_isinf and Perl_isfinite enhancements.Jarkko Hietaniemi2014-08-221-22/+11
|
* Clean up the fpclass forest.Jarkko Hietaniemi2014-08-221-38/+78
|
* Win32 apparently has _isnan() and _finite(), and _fpclass().Jarkko Hietaniemi2014-08-201-3/+28
| | | | (At least, if one believes the Oracle of Google.)