Permalink
Browse files

various changes from trying to build on testdrive

  • Loading branch information...
Tony Cook
Tony Cook committed May 1, 2002
1 parent 86d20cb commit 26fd367b48b47803a560b13aeb30d58a2d75dead
Showing with 24 additions and 11 deletions.
  1. +9 −2 Changes
  2. +7 −6 Imager.xs
  3. +2 −2 datatypes.h
  4. +5 −1 img16.c
  5. +1 −0 tags.c
View
11 Changes
@@ -651,8 +651,15 @@ Revision history for Perl extension Imager.
parameter
- support UTF8 text with Freetype 1.x
- second parameter to SvPV() must be of type STRLEN
- - Doc pathces from cogent.
- - Fixed out of bounds access on bitmap for flood fills.
+ - Doc pathces from cogent.
+ - Fixed out of bounds access on bitmap for flood fills.
+ - some char * vs unsigned char * casts missing on OSF1 v4.0
+ - some enums had , on the last item in datatypes.h, which OSF1
+ didn't like
+ - Compaq C 6.4 (OSF1) claims to be C99 but doesn't provide
+ stdint.h, don't try to use it under OSF
+ - fix missing initialization in tags.c
+
=================================================================
For latest versions check the Imager-devel pages:
View
@@ -1142,7 +1142,7 @@ io_slurp(ig)
data = NULL;
tlength = io_slurp(ig, &data);
EXTEND(SP,1);
- PUSHs(sv_2mortal(newSVpv(data,tlength)));
+ PUSHs(sv_2mortal(newSVpv((char *)data,tlength)));
myfree(data);
@@ -1244,7 +1244,8 @@ i_img_getdata(im)
Imager::ImgRaw im
PPCODE:
EXTEND(SP, 1);
- PUSHs(im->idata ? sv_2mortal(newSVpv(im->idata, im->bytes))
+ PUSHs(im->idata ?
+ sv_2mortal(newSVpv((char *)im->idata, im->bytes))
: &PL_sv_undef);
@@ -3173,7 +3174,7 @@ i_gpal(im, l, r, y)
}
else {
EXTEND(SP, 1);
- PUSHs(sv_2mortal(newSVpv(work, count * sizeof(i_palidx))));
+ PUSHs(sv_2mortal(newSVpv((char *)work, count * sizeof(i_palidx))));
}
myfree(work);
}
@@ -3378,7 +3379,7 @@ i_gsamp(im, l, r, y, ...)
}
else {
EXTEND(SP, 1);
- PUSHs(sv_2mortal(newSVpv(data, count * sizeof(i_sample_t))));
+ PUSHs(sv_2mortal(newSVpv((char *)data, count * sizeof(i_sample_t))));
}
myfree(data);
}
@@ -4034,7 +4035,7 @@ i_new_fill_hatch(fg, bg, combine, hatch, cust_hatch, dx, dy)
STRLEN len;
CODE:
if (SvOK(ST(4))) {
- cust_hatch = SvPV(ST(4), len);
+ cust_hatch = (unsigned char *)SvPV(ST(4), len);
}
else
cust_hatch = NULL;
@@ -4055,7 +4056,7 @@ i_new_fill_hatchf(fg, bg, combine, hatch, cust_hatch, dx, dy)
STRLEN len;
CODE:
if (SvOK(ST(4))) {
- cust_hatch = SvPV(ST(4), len);
+ cust_hatch = (unsigned char *)SvPV(ST(4), len);
}
else
cust_hatch = NULL;
View
@@ -49,15 +49,15 @@ typedef union {
typedef enum {
i_direct_type, /* direct colour, keeps RGB values per pixel */
- i_palette_type, /* keeps a palette index per pixel */
+ i_palette_type /* keeps a palette index per pixel */
} i_img_type_t;
typedef enum {
/* bits per sample, not per pixel */
/* a paletted image might have one bit per sample */
i_8_bits = 8,
i_16_bits = 16,
- i_double_bits = sizeof(double) * 8,
+ i_double_bits = sizeof(double) * 8
} i_img_bits_t;
typedef struct {
View
@@ -82,8 +82,12 @@ static i_img IIM_base_16bit_direct =
so we check for one otherwise we work by bytes directly
We do assume 8-bit char
+
+ "Compaq C V6.4-009 on Compaq Tru64 UNIX V5.1A (Rev. 1885)" says it
+ supports C99, but doesn't supply stdint.h, which is required for
+ both hosted and freestanding implementations. So guard against it.
*/
-#if __STDC_VERSION__ >= 199901L
+#if __STDC_VERSION__ >= 199901L && !defined(OS_dec_osf)
/* C99 should define something useful */
#include <stdint.h>
#ifdef UINT16_MAX
View
1 tags.c
@@ -338,6 +338,7 @@ static int parse_long(char *data, char **end, long *out) {
static int parse_long_list(char *data, char **end, int maxcount, long *out) {
int i;
+ i = 0;
while (i < maxcount-1) {
if (!parse_long(data, &data, out))
return 0;

0 comments on commit 26fd367

Please sign in to comment.