1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-22 08:58:47 +00:00

- Use SCHAR_MAX [1]

- Only s/llrintf/rintf/ on 4.x and early 5.x

Requested by:	gavl author [1]
This commit is contained in:
Michael Johnson 2005-05-12 01:53:28 +00:00
parent 92e02ee037
commit 29de4a86b3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=135089
3 changed files with 10 additions and 3 deletions

View File

@ -29,6 +29,11 @@ PORTDOCS= README
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 504000
EXTRA_PATCHES= ${PATCHDIR}/gavl-mix.c-patch \
${PATCHDIR}/gavl-c-_cmix_c.c-patch
.endif
pre-everything::
.if !defined(WITH_OPTIMIZED_CFLAGS)
@${ECHO_MSG} "===>"
@ -39,8 +44,10 @@ pre-everything::
post-patch:
# No llrintf in freebsd (yet)
.if ${OSVERSION} < 504000
@${REINPLACE_CMD} -e 's|llrintf|rintf|g' \
${WRKSRC}/gavl/c/*.*
.endif
.if !defined(WITH_OPTIMIZED_CFLAGS)
@${REINPLACE_CMD} -e \
's|-fomit-frame-pointer -funroll-all-loops -falign-functions=2 -falign-loops=2 -falign-jumps=2||; \

View File

@ -4,10 +4,10 @@
+#include <machine/limits.h>
+
+#ifndef INT8_MAX
+#define INT8_MAX INT_MAX
+#define INT8_MAX SCHAR_MAX
+#endif
+#ifndef INT8_MIN
+#define INT8_MIN INT_MIN
+#define INT8_MIN SCHAR_MIN
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX SHRT_MAX

View File

@ -7,7 +7,7 @@
+#include <machine/limits.h>
+
+#ifndef INT8_MAX
+#define INT8_MAX INT_MAX
+#define INT8_MAX SCHAR_MAX
+#endif
+#ifndef INT16_MAX
+#define INT16_MAX SHRT_MAX