On 8/12/10, Maciej (Matchek) Blizinski <[email protected]> wrote:
>
>
> 2. Compilation fails on sparc:
>
> "../include/my_global.h", line 1046: #error: sizeof(void *) is neither
> sizeof(int) nor sizeof(long) nor sizeof(long long)
> cc: acomp failed for strxmov.c
>
> Is this a known problem with a known fix or workaround?
>

well thats surprising.

its really just looking for "size of address pointer". So replace with
the appropriate typedef, and possibly disable that whole clause.
and/or its trying to determine "is this 32bit or 64bit machine". erm..
sigh.. goes to look at code.
nope, its like I said the first time.

  /*blahblahblah*/
typedef int intptr;


You may note that there are hardcoded definitions for sections such as
#if defined(__APPLE__) && defined(__MACH__)
It's whining about SIZEOF_CHARP



when in doubt, compare to older versions.
The older 5.0.90 has a much simpler, saner approach:

#if SIZEOF_CHARP == 4
typedef long            my_ptrdiff_t;
#else
typedef long long       my_ptrdiff_t;
#endif

although REALLY, it should be

#if SIZEOF_CHARP == 4
typedef uint32_t           my_ptrdiff_t;
#else
typedef uint64_t       my_ptrdiff_t;
#endif


getting even more fancy, since there are already checks for
#ifdef HAVE_SYS_TYPES_H


then I think it may be save to have
#ifdef HAVE_SYS_TYPES_H
#  if SIZEOF_CHARP == 4
typedef uint32_t           my_ptrdiff_t;
#  else
typedef uint64_t       my_ptrdiff_t;
#  endif
#else
/* Original dumb #if SIZEOF_CHARP == SIZEOF_INT   code here */
#endif



HOWEVER, all that being said...
the following code works fine in solaris:
        printf("size of pointer is %d\n", sizeof(void*));

(result: "size of pointer is 4")

so, given that SIZEOF_CHARP seems to be getting calculated wrong...
maybe you need to figure out why that is, and fix it, first.

for what it's worth, I also tried
        printf("size of charp is %d\n", sizeof(char*));
and that also came out to be 4.
_______________________________________________
maintainers mailing list
[email protected]
https://lists.opencsw.org/mailman/listinfo/maintainers
.:: This mailing list's archive is public. ::.

Reply via email to