summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
authorChip Salzenberg <chip@atlantic.net>1996-12-21 20:08:54 +1200
committerChip Salzenberg <chip@atlantic.net>1996-12-23 12:58:58 +1200
commit888911fcc68a18021b42aeaddb5cb8725ce411af (patch)
treee4b935869c521f8a94157447c187bf10110edc84 /perlio.c
parentc2a5c2d2fe03e66800c4332bfae5601c4d25896f (diff)
downloadperl-888911fcc68a18021b42aeaddb5cb8725ce411af.tar.gz
Prevent warnings when STDCHAR is unsigned
Diffstat (limited to 'perlio.c')
-rw-r--r--perlio.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/perlio.c b/perlio.c
index a1e6ff0f5d..85b036ca9f 100644
--- a/perlio.c
+++ b/perlio.c
@@ -158,19 +158,19 @@ int cnt;
void
PerlIO_set_ptrcnt(f,ptr,cnt)
PerlIO *f;
-char *ptr;
+STDCHAR *ptr;
int cnt;
{
#ifdef FILE_bufsiz
- char *e = (char *)(FILE_base(f) + FILE_bufsiz(f));
- int ec = e - ptr;
+ STDCHAR *e = FILE_base(f) + FILE_bufsiz(f);
+ int ec = e - ptr;
if (ptr > e + 1)
warn("Setting ptr %p > end+1 %p\n", ptr, e + 1);
if (cnt != ec)
warn("Setting cnt to %d, ptr implies %d\n",cnt,ec);
#endif
#if defined(USE_STDIO_PTR) && defined(STDIO_PTR_LVALUE)
- FILE_ptr(f) = (STDCHAR *) ptr;
+ FILE_ptr(f) = ptr;
#else
croak("Cannot set 'ptr' of FILE * on this system");
#endif
@@ -208,12 +208,12 @@ PerlIO *f;
}
#undef PerlIO_get_ptr
-char *
+STDCHAR *
PerlIO_get_ptr(f)
PerlIO *f;
{
#ifdef FILE_ptr
- return (char *) FILE_ptr(f);
+ return FILE_ptr(f);
#else
croak("Cannot get 'ptr' of FILE * on this system");
return NULL;
@@ -221,12 +221,12 @@ PerlIO *f;
}
#undef PerlIO_get_base
-char *
+STDCHAR *
PerlIO_get_base(f)
PerlIO *f;
{
#ifdef FILE_base
- return (char *) FILE_base(f);
+ return FILE_base(f);
#else
croak("Cannot get 'base' of FILE * on this system");
return NULL;