Fix fpos_t configure test, allowing this to build on netbsd-6.

PR 46412.

XXX: I'm not convinced the results will actually *work*. If anyone
XXX: knows how to check this, please do.
This commit is contained in:
dholland 2012-05-07 19:57:17 +00:00
parent dadf6c182a
commit fe23580676
2 changed files with 18 additions and 1 deletions

View file

@ -1,6 +1,7 @@
$NetBSD: distinfo,v 1.23 2011/04/05 17:18:14 drochner Exp $
$NetBSD: distinfo,v 1.24 2012/05/07 19:57:17 dholland Exp $
SHA1 (calc-2.12.4.1.tar.bz2) = b64eae89de2167f439f52b4005bbc4e5dfc0d6fb
RMD160 (calc-2.12.4.1.tar.bz2) = 68fe6352b6a1b58e53d7cb4b4f51c596aa8539f7
Size (calc-2.12.4.1.tar.bz2) = 865856 bytes
SHA1 (patch-aa) = 65da8569bb74647ef01bfc389690d631d161ab96
SHA1 (patch-fposval_c) = 8a8d08f8b566e583faa3bd9033c4a9ac90cb343c

View file

@ -0,0 +1,16 @@
$NetBSD: patch-fposval_c,v 1.1 2012/05/07 19:57:17 dholland Exp $
Avoid generating incorrect code that leads to a build failure on
NetBSD 6+.
--- fposval.c~ 2007-09-19 22:35:23.000000000 +0000
+++ fposval.c
@@ -129,7 +129,7 @@ main(int argc, char **argv)
* systems a FILEPOS is not a scalar hince we must memcpy.
*/
printf("#define SWAP_HALF_IN_FILEPOS(dest, src)\t%s\n",
- "memcpy((void *)(dest), (void *)(src), sizeof(FPOS_POS_LEN))");
+ "memcpy((void *)(dest), (void *)(src), FILEPOS_LEN)");
#endif /* HAVE_FILEPOS_SCALAR */
#endif /* CALC_BYTE_ORDER == BIG_ENDIAN */
putchar('\n');