summaryrefslogtreecommitdiff
path: root/os2
diff options
context:
space:
mode:
authorYitzchak Scott-Thoennes <sthoenna@efn.org>2000-08-29 16:16:14 -0700
committerJarkko Hietaniemi <jhi@iki.fi>2000-08-30 14:06:02 +0000
commit46e87256f3802a18ce825adb0e5f1d5ead748a5c (patch)
tree677b152ade6ad0885921c72fd8de050c38338b9f /os2
parent7428bafeba56c70a072b3dabf12576d9ea8fda3b (diff)
downloadperl-46e87256f3802a18ce825adb0e5f1d5ead748a5c.tar.gz
fix misc cast warnings
Message-ID: <uaKr5gzkgGwQ092yn@efn.org> p4raw-id: //depot/perl@6915
Diffstat (limited to 'os2')
-rw-r--r--os2/OS2/ExtAttr/ExtAttr.xs10
-rw-r--r--os2/OS2/ExtAttr/typemap2
-rw-r--r--os2/OS2/REXX/REXX.xs6
-rw-r--r--os2/os2.c4
-rw-r--r--os2/os2ish.h3
5 files changed, 15 insertions, 10 deletions
diff --git a/os2/OS2/ExtAttr/ExtAttr.xs b/os2/OS2/ExtAttr/ExtAttr.xs
index a69a01c7f3..1f4e203cec 100644
--- a/os2/OS2/ExtAttr/ExtAttr.xs
+++ b/os2/OS2/ExtAttr/ExtAttr.xs
@@ -15,13 +15,13 @@ my_eadvalue(pTHX_ _ead ead, int index)
{
SV *sv;
int size = _ead_value_size(ead, index);
- void *p;
+ const char *p;
if (size == -1) {
Perl_die(aTHX_ "Error getting size of EA: %s", strerror(errno));
}
p = _ead_get_value(ead, index);
- return newSVpv((char*)p, size);
+ return newSVpv(p, size);
}
#define my_eadreplace(ead, index, sv, flag) \
@@ -136,7 +136,7 @@ _ead_find(ead, name)
_ead ead
char * name
-void *
+const void *
_ead_get_fea2list(ead)
_ead ead
@@ -145,12 +145,12 @@ _ead_get_flags(ead, index)
_ead ead
int index
-char *
+const char *
_ead_get_name(ead, index)
_ead ead
int index
-void *
+const void *
_ead_get_value(ead, index)
_ead ead
int index
diff --git a/os2/OS2/ExtAttr/typemap b/os2/OS2/ExtAttr/typemap
index a5ff8d63ac..c2f5cda2ed 100644
--- a/os2/OS2/ExtAttr/typemap
+++ b/os2/OS2/ExtAttr/typemap
@@ -1,2 +1,4 @@
struct _ea * T_PTR
_ead T_PTR
+const void * T_PTR
+const char * T_PV
diff --git a/os2/OS2/REXX/REXX.xs b/os2/OS2/REXX/REXX.xs
index 8a8e5f2da0..1dc20d3c04 100644
--- a/os2/OS2/REXX/REXX.xs
+++ b/os2/OS2/REXX/REXX.xs
@@ -29,7 +29,7 @@ static RXSTRING rxcommand = { 9, "RXCOMMAND" };
static RXSTRING rxsubroutine = { 12, "RXSUBROUTINE" };
static RXSTRING rxfunction = { 11, "RXFUNCTION" };
-static ULONG PERLCALL(PSZ name, ULONG argc, PRXSTRING argv, PSZ queue, PRXSTRING ret);
+static ULONG PERLCALL(PCSZ name, ULONG argc, PRXSTRING argv, PCSZ queue, PRXSTRING ret);
#if 1
#define Set RXSHV_SET
@@ -109,7 +109,7 @@ exec_in_REXX(pTHX_ char *cmd, char * handlerName, RexxFunctionHandler *handler)
static SV* exec_cv;
static ULONG
-PERLSTART(PSZ name, ULONG argc, PRXSTRING argv, PSZ queue, PRXSTRING ret)
+PERLSTART(PCSZ name, ULONG argc, PRXSTRING argv, PCSZ queue, PRXSTRING ret)
{
return PERLCALL(NULL, argc, argv, queue, ret);
}
@@ -122,7 +122,7 @@ PERLSTART(PSZ name, ULONG argc, PRXSTRING argv, PSZ queue, PRXSTRING ret)
#define REXX_eval(cmd) REXX_eval_with(cmd,NULL,NULL)
static ULONG
-PERLCALL(PSZ name, ULONG argc, PRXSTRING argv, PSZ queue, PRXSTRING ret)
+PERLCALL(PCSZ name, ULONG argc, PRXSTRING argv, PCSZ queue, PRXSTRING ret)
{
dTHX;
EXCEPTIONREGISTRATIONRECORD xreg = { NULL, _emx_exception };
diff --git a/os2/os2.c b/os2/os2.c
index 0d66b86000..c324cf20f1 100644
--- a/os2/os2.c
+++ b/os2/os2.c
@@ -1123,9 +1123,9 @@ fork(void)
#endif
/*******************************************************************/
-/* not implemented in EMX 0.9a */
+/* not implemented in EMX 0.9d */
-void * ctermid(x) { return 0; }
+char * ctermid(char *s) { return 0; }
#ifdef MYTTYNAME /* was not in emx0.9a */
void * ttyname(x) { return 0; }
diff --git a/os2/os2ish.h b/os2/os2ish.h
index 23857ac532..d6bf2df65b 100644
--- a/os2/os2ish.h
+++ b/os2/os2ish.h
@@ -305,6 +305,9 @@ void *emx_realloc (void *, size_t);
? (--FILE_ptr(fp), ++FILE_cnt(fp), (int)c) : ungetc(c,fp))
#endif
+/* ctermid is missing from emx0.9d */
+char *ctermid(char *s);
+
#define OP_BINARY O_BINARY
#define OS2_STAT_HACK 1