mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-29 01:13:08 +00:00
000cebd64d
PR: ports/107134 Submitted by: AMAKAWA Shuhei <sa264@cam.ac.uk> (maintainer)
36 lines
919 B
Plaintext
36 lines
919 B
Plaintext
--- spice/common/src/include/util.h.orig Sun Jan 30 04:14:24 1994
|
|
+++ spice/common/src/include/util.h Sat Dec 23 19:48:50 2006
|
|
@@ -6,6 +6,10 @@
|
|
#ifndef UTIL
|
|
#define UTIL
|
|
|
|
+#if (defined(__unix__) || defined(unix)) && !defined(USG)
|
|
+#include <sys/param.h>
|
|
+#endif
|
|
+
|
|
/* #define MALLOC(x) calloc(1,(unsigned)(x)) */
|
|
#define MALLOC(x) tmalloc((unsigned)(x))
|
|
#define FREE(x) {if (x) {free((char *)(x));(x) = 0;}}
|
|
@@ -18,8 +22,10 @@
|
|
#include <stdlib.h>
|
|
#endif
|
|
#else
|
|
+/*
|
|
extern char *malloc();
|
|
extern char *calloc();
|
|
+*/
|
|
extern char *realloc();
|
|
extern void free();
|
|
#endif
|
|
@@ -44,8 +50,10 @@
|
|
#endif
|
|
|
|
/* XXX Move these into the above ifdef someday */
|
|
+#if !(defined(BSD) && (BSD >= 199306))
|
|
#define MIN(a,b) ((a) < (b) ? (a) : (b))
|
|
#define MAX(a,b) ((a) > (b) ? (a) : (b))
|
|
+#endif
|
|
#define SIGN(a,b) ( b >= 0 ? (a >= 0 ? a : - a) : (a >= 0 ? - a : a))
|
|
|
|
#define ABORT() fflush(stderr);fflush(stdout);abort();
|