Index: Makefile =================================================================== RCS file: /usr/cvs/free/depot/ports/lang/ezm3/Makefile,v retrieving revision 1.9 diff -u -r1.9 Makefile --- Makefile 4 Feb 2004 05:21:33 -0000 1.9 +++ Makefile 27 Feb 2004 01:29:23 -0000 @@ -55,6 +55,29 @@ WORDSIZE= 64 ENDIANESS= be BOOTSTRAP= ezm3-${PORTVERSION}-${TARGET}-boot.tar.bz2 + +# Special checking for time_t on sparc64 +CHECKTIMET=${WRKSRC}/checktimet +CHECKRESULT!= ${RM} -rf ${CHECKTIMET} && \ + ${CC} -o ${CHECKTIMET} ${FILESDIR}/checktimet.c && \ + ${WRKSRC}/checktimet + +.if ${CHECKRESULT} == "8_BTT" +EXTRA_PATCHES=${FILESDIR}/extra-patch-64btt +.endif + +pre-patch: +.if ${CHECKRESULT} == "4_BTT" + @${ECHO_MSG} "===> Note: ezm3 is being built for 32-bit time_t" +.elif ${CHECKRESULT} == "8_BTT" + @${ECHO_MSG} "===> Note: ezm3 is being built for 64-bit time_t" +.else + @${ECHO_MSG} "*** ERROR: " + @${ECHO_MSG} "*** While checking the size of time_t, " + @${ECHO_MSG} "*** bad value for CHECKRESULT == '${CHECKRESULT}'" + false +.endif + .endif do-build: Index: files/checktimet.c =================================================================== RCS file: files/checktimet.c diff -N files/checktimet.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/checktimet.c 27 Feb 2004 01:29:23 -0000 @@ -0,0 +1,10 @@ +#include +#include + +int +main(int argc, char **argv) +{ + + printf("%d_BTT\n", (int)sizeof(time_t)); + return (0); +} Index: files/extra-patch-64btt =================================================================== RCS file: files/extra-patch-64btt diff -N files/extra-patch-64btt --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/extra-patch-64btt 27 Feb 2004 01:29:23 -0000 @@ -0,0 +1,11 @@ +--- libs/m3core/src/unix/freebsd-4.sparc64/Utypes.i3.orig Wed Feb 25 20:11:41 2004 ++++ libs/m3core/src/unix/freebsd-4.sparc64/Utypes.i3 Wed Feb 25 20:09:27 2004 +@@ -60,7 +60,7 @@ + ino_t = u_int32_t; + swblk_t = int32_t; + size_t = unsigned_long; +- time_t = int32_t; ++ time_t = int64_t; + dev_t = u_int32_t; + off_t = int64_t; + key_t = long;