From: Yitzchak Scott-Thoennes Date: Tue, 29 Aug 2000 23:16:14 +0000 (-0700) Subject: fix misc cast warnings X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=46e87256f3802a18ce825adb0e5f1d5ead748a5c;p=p5sagit%2Fp5-mst-13.2.git fix misc cast warnings Message-ID: p4raw-id: //depot/perl@6915 --- diff --git a/lib/ExtUtils/typemap b/lib/ExtUtils/typemap index 0260678..d65ead2 100644 --- a/lib/ExtUtils/typemap +++ b/lib/ExtUtils/typemap @@ -231,7 +231,7 @@ T_DOUBLE T_PV sv_setpv((SV*)$arg, $var); T_PTR - sv_setiv($arg, (IV)$var); + sv_setiv($arg, PTR2IV($var)); T_PTRREF sv_setref_pv($arg, Nullch, (void*)$var); T_REF_IV_REF diff --git a/os2/OS2/ExtAttr/ExtAttr.xs b/os2/OS2/ExtAttr/ExtAttr.xs index a69a01c..1f4e203 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 a5ff8d6..c2f5cda 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 8a8e5f2..1dc20d3 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 0d66b86..c324cf2 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 23857ac..d6bf2df 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