x2p/str.c C++ clean-up.
Compiling str.c with HP C++ for OpenVMS says,
FILE_ptr(fp) = (void*)ptr; /* LHS STDCHAR* cast non-portable */
.....................^
%CXX-E-INCASSOPN, a value of type "void *" cannot be assigned to an
entity of type "char *"
at line number 213 in file D0:[craig.blead.x2p]str.c;1
FILE_ptr(fp) = (void*)ptr; /* LHS STDCHAR* cast non-portable */
.................^
%CXX-E-INCASSOPN, a value of type "void *" cannot be assigned to an
entity of type "char *"
at line number 233 in file D0:[craig.blead.x2p]str.c;1
So remove the void casts to avoid the errors. This is an exact
mirror of
d06fc7d4ca98, which also removed the void cast from an
equivalent line in perlio.c. That was almost six years ago, so if
anything especially dire were going to happen without the cast, it
likely would have happened by now.
The casts were added by
cc00df79d5 and
5faea5d5, the former of which
refers vaguely to "compiler worries" without specifying what they
were, but signedness warnings are a likely suspect. We'll get those
again now, but warnings are less bad than errors. A more robust
solution would be to add a Configure-time detection of the type of
FILE._ptr and cast everything to that.
An even more robust solution would be to eliminate all the "buffer
snooping" mechanisms and concede that maintaining an stdio
implementation is a job for stdio maintainers and not Perl
maintainers.