cc_t
getcc(termios_ref, ccix)
POSIX::Termios termios_ref
- int ccix
+ unsigned int ccix
CODE:
#ifdef I_TERMIOS /* References a termios structure member so ifdef it out. */
if (ccix >= NCCS)
void
setcc(termios_ref, ccix, cc)
POSIX::Termios termios_ref
- int ccix
+ unsigned int ccix
cc_t cc
CODE:
#ifdef I_TERMIOS /* References a termios structure member so ifdef it out. */
setlocale(category, locale = 0)
int category
char * locale
+ PREINIT:
+ char * retval;
CODE:
- RETVAL = setlocale(category, locale);
- if (RETVAL) {
+ retval = setlocale(category, locale);
+ if (retval) {
+ /* Save retval since subsequent setlocale() calls
+ * may overwrite it. */
+ RETVAL = savepv(retval);
#ifdef USE_LOCALE_CTYPE
if (category == LC_CTYPE
#ifdef LC_ALL
}
#endif /* USE_LOCALE_NUMERIC */
}
+ else
+ RETVAL = NULL;
OUTPUT:
RETVAL
-
+ CLEANUP:
+ if (RETVAL)
+ Safefree(RETVAL);
NV
acos(x)
SV** svp;
SV** sigsvp;
+ if (sig < 0) {
+ croak("Negative signals are not allowed");
+ }
+
if (sig == 0 && SvPOK(ST(0))) {
const char *s = SvPVX_const(ST(0));
int i = whichsig(s);
svp = hv_fetchs(action, "SAFE", FALSE);
act.sa_handler =
DPTR2FPTR(
- void (*)(),
+ void (*)(int),
(*svp && SvTRUE(*svp))
? PL_csighandlerp : PL_sighandlerp
);
STRLEN dstlen;
char *p = SvPV(src,srclen);
srclen++;
- ST(0) = sv_2mortal(NEWSV(800,srclen*4+1));
+ ST(0) = sv_2mortal(newSV(srclen*4+1));
dstlen = strxfrm(SvPVX(ST(0)), p, (size_t)srclen);
if (dstlen > srclen) {
dstlen++;
int duration
char *
-asctime(sec, min, hour, mday, mon, year, wday = 0, yday = 0, isdst = 0)
+asctime(sec, min, hour, mday, mon, year, wday = 0, yday = 0, isdst = -1)
int sec
int min
int hour
Time_t time2
SysRetLong
-mktime(sec, min, hour, mday, mon, year, wday = 0, yday = 0, isdst = 0)
+mktime(sec, min, hour, mday, mon, year, wday = 0, yday = 0, isdst = -1)
int sec
int min
int hour
mytm.tm_wday = wday;
mytm.tm_yday = yday;
mytm.tm_isdst = isdst;
- RETVAL = mktime(&mytm);
+ RETVAL = (SysRetLong) mktime(&mytm);
}
OUTPUT:
RETVAL
char * s = 0;
CODE:
#ifdef HAS_CTERMID_R
- s = safemalloc((size_t) L_ctermid);
+ s = (char *) safemalloc((size_t) L_ctermid);
#endif
RETVAL = ctermid(s);
OUTPUT: