* be optimized away on most platforms;
* only Solaris and Linux seem to flush
* on that. --jhi */
-#ifdef USE_SFIO
- /* sfio fails to clear error on next
- sfwrite, contrary to documentation.
- -- Nicholas Clark */
- if (PerlIO_seek(that_fp, 0, SEEK_CUR) == -1)
- PerlIO_clearerr(that_fp);
-#endif
/* On the other hand, do all platforms
* take gracefully to flushing a read-only
* filehandle? Perhaps we should do
if (!IS_SAFE_PATHNAME(s, len, "unlink")) {
tot--;
}
- else if (PerlProc_geteuid() || PL_unsafe) {
+ else if (PL_unsafe) {
if (UNLINK(s))
tot--;
}
#ifdef Semctl
union semun unsemds;
+ if(cmd == SETVAL) {
+ unsemds.val = PTR2nat(a);
+ }
+ else {
#ifdef EXTRA_F_IN_SEMUN_BUF
- unsemds.buff = (struct semid_ds *)a;
+ unsemds.buff = (struct semid_ds *)a;
#else
- unsemds.buf = (struct semid_ds *)a;
+ unsemds.buf = (struct semid_ds *)a;
#endif
+ }
ret = Semctl(id, n, cmd, unsemds);
#else
/* diag_listed_as: sem%s not implemented */
t++;
}
result = semop(id, temps, nsops);
- t = temps;
- o = ops;
- i = nsops;
- while (i--) {
- *o++ = t->sem_num;
- *o++ = t->sem_op;
- *o++ = t->sem_flg;
- t++;
- }
Safefree(temps);
return result;
}
=for apidoc start_glob
Function called by C<do_readline> to spawn a glob (or do the glob inside
-perl on VMS). This code used to be inline, but now perl uses C<File::Glob>
+perl on VMS). This code used to be inline, but now perl uses C<File::Glob>
this glob starter is only used by miniperl during the build process.
Moving it away shrinks pp_hot.c; shrinking pp_hot.c helps speed perl up.
#else
sv_setpv(tmpcmd, "echo ");
sv_catsv(tmpcmd, tmpglob);
-#if 'z' - 'a' == 25
- sv_catpv(tmpcmd, "|tr -s ' \t\f\r' '\\012\\012\\012\\012'|");
-#else
sv_catpv(tmpcmd, "|tr -s ' \t\f\r' '\\n\\n\\n\\n'|");
-#endif
#endif /* !CSH */
#endif /* !DOSISH */
{