}
mode[0] = 'w';
writing = 1;
-#ifdef HAS_STRLCAT
if (out_raw)
- strlcat(mode, "b", PERL_MODE_MAX - 1);
+ my_strlcat(mode, "b", PERL_MODE_MAX - 1);
else if (out_crlf)
- strlcat(mode, "t", PERL_MODE_MAX - 1);
-#else
- if (out_raw)
- strcat(mode, "b");
- else if (out_crlf)
- strcat(mode, "t");
-#endif
+ my_strlcat(mode, "t", PERL_MODE_MAX - 1);
if (num_svs > 1) {
fp = PerlProc_popen_list(mode, num_svs, svp);
}
}
writing = 1;
-#ifdef HAS_STRLCAT
if (out_raw)
- strlcat(mode, "b", PERL_MODE_MAX - 1);
+ my_strlcat(mode, "b", PERL_MODE_MAX - 1);
else if (out_crlf)
- strlcat(mode, "t", PERL_MODE_MAX - 1);
-#else
- if (out_raw)
- strcat(mode, "b");
- else if (out_crlf)
- strcat(mode, "t");
-#endif
+ my_strlcat(mode, "t", PERL_MODE_MAX - 1);
if (*type == '&') {
duplicity:
dodup = PERLIO_DUP_FD;
type++;
} while (isSPACE(*type));
mode[0] = 'r';
-#ifdef HAS_STRLCAT
if (in_raw)
- strlcat(mode, "b", PERL_MODE_MAX - 1);
+ my_strlcat(mode, "b", PERL_MODE_MAX - 1);
else if (in_crlf)
- strlcat(mode, "t", PERL_MODE_MAX - 1);
-#else
- if (in_raw)
- strcat(mode, "b");
- else if (in_crlf)
- strcat(mode, "t");
-#endif
+ my_strlcat(mode, "t", PERL_MODE_MAX - 1);
if (*type == '&') {
goto duplicity;
}
TAINT_PROPER("piped open");
mode[0] = 'r';
-#ifdef HAS_STRLCAT
if (in_raw)
- strlcat(mode, "b", PERL_MODE_MAX - 1);
+ my_strlcat(mode, "b", PERL_MODE_MAX - 1);
else if (in_crlf)
- strlcat(mode, "t", PERL_MODE_MAX - 1);
-#else
- if (in_raw)
- strcat(mode, "b");
- else if (in_crlf)
- strcat(mode, "t");
-#endif
+ my_strlcat(mode, "t", PERL_MODE_MAX - 1);
if (num_svs > 1) {
fp = PerlProc_popen_list(mode,num_svs,svp);
;
mode[0] = 'r';
-#ifdef HAS_STRLCAT
if (in_raw)
- strlcat(mode, "b", PERL_MODE_MAX - 1);
+ my_strlcat(mode, "b", PERL_MODE_MAX - 1);
else if (in_crlf)
- strlcat(mode, "t", PERL_MODE_MAX - 1);
-#else
- if (in_raw)
- strcat(mode, "b");
- else if (in_crlf)
- strcat(mode, "t");
-#endif
+ my_strlcat(mode, "t", PERL_MODE_MAX - 1);
if (*name == '-' && name[1] == '\0') {
fp = PerlIO_stdin();
char flags[PERL_FLAGS_MAX];
if (strnEQ(cmd,PL_cshname,PL_cshlen) &&
strnEQ(cmd+PL_cshlen," -c",3)) {
-#ifdef HAS_STRLCPY
- strlcpy(flags, "-c", PERL_FLAGS_MAX);
-#else
- strcpy(flags,"-c");
-#endif
+ my_strlcpy(flags, "-c", PERL_FLAGS_MAX);
s = cmd+PL_cshlen+3;
if (*s == 'f') {
s++;
-#ifdef HAS_STRLCPY
- strlcat(flags, "f", PERL_FLAGS_MAX - 2);
-#else
- strcat(flags,"f");
-#endif
+ my_strlcat(flags, "f", PERL_FLAGS_MAX - 2);
}
if (*s == ' ')
s++;
STRLEN len;
const char *mbuf = SvPV_const(mstr, len);
- const I32 n = ((I32)len > msize) ? msize : (I32)len;
+ const I32 n = (len > msize) ? msize : len;
Copy(mbuf, shm + mpos, n, char);
if (n < msize)
memzero(shm + mpos + n, msize - n);
U32 seq;
HV *saved_hh = NULL;
const char * const fakestr = "_<(eval )";
-#ifdef HAS_STRLCPY
const int fakelen = 9 + 1;
-#endif
if (PL_op->op_private & OPpEVAL_HAS_HH) {
saved_hh = (HV*) SvREFCNT_inc(POPs);
if (PERLDB_INTER && was != (I32)PL_sub_generation /* Some subs defined here. */
&& ret != PL_op->op_next) { /* Successive compilation. */
/* Copy in anything fake and short. */
-#ifdef HAS_STRLCPY
- strlcpy(safestr, fakestr, fakelen);
-#else
- strcpy(safestr, fakestr);
-#endif /* #ifdef HAS_STRLCPY */
+ my_strlcpy(safestr, fakestr, fakelen);
}
return DOCATCH(ret);
}