Wed Oct 8 21:35:56 2008 UTC ()
Define SIZE_MAX if it is missing. Fixes build on Interix.


(joerg)
diff -r1.1.1.1 -r1.2 pkgsrc/devel/nbpatch/files/common.h

cvs diff -r1.1.1.1 -r1.2 pkgsrc/devel/nbpatch/files/common.h (expand / switch to unified diff)

--- pkgsrc/devel/nbpatch/files/common.h 2008/09/10 11:03:21 1.1.1.1
+++ pkgsrc/devel/nbpatch/files/common.h 2008/10/08 21:35:56 1.2
@@ -1,17 +1,17 @@ @@ -1,17 +1,17 @@
1/* 1/*
2 * $OpenBSD: common.h,v 1.26 2006/03/11 19:41:30 otto Exp $ 2 * $OpenBSD: common.h,v 1.26 2006/03/11 19:41:30 otto Exp $
3 * $DragonFly: src/usr.bin/patch/common.h,v 1.5 2008/08/10 23:50:12 joerg Exp $ 3 * $DragonFly: src/usr.bin/patch/common.h,v 1.5 2008/08/10 23:50:12 joerg Exp $
4 * $NetBSD: common.h,v 1.1.1.1 2008/09/10 11:03:21 joerg Exp $ 4 * $NetBSD: common.h,v 1.2 2008/10/08 21:35:56 joerg Exp $
5 */ 5 */
6 6
7/* 7/*
8 * patch - a program to apply diffs to original files 8 * patch - a program to apply diffs to original files
9 *  9 *
10 * Copyright 1986, Larry Wall 10 * Copyright 1986, Larry Wall
11 *  11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following condition is met: 13 * modification, are permitted provided that the following condition is met:
14 * 1. Redistributions of source code must retain the above copyright notice, 14 * 1. Redistributions of source code must retain the above copyright notice,
15 * this condition and the following disclaimer. 15 * this condition and the following disclaimer.
16 *  16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY 17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
@@ -27,26 +27,30 @@ @@ -27,26 +27,30 @@
27 * SUCH DAMAGE. 27 * SUCH DAMAGE.
28 *  28 *
29 * -C option added in 1998, original code by Marc Espie, based on FreeBSD 29 * -C option added in 1998, original code by Marc Espie, based on FreeBSD
30 * behaviour 30 * behaviour
31 */ 31 */
32 32
33#include <sys/types.h> 33#include <sys/types.h>
34 34
35#include <stdbool.h> 35#include <stdbool.h>
36#if HAVE_STDINT_H 36#if HAVE_STDINT_H
37#include <stdint.h> 37#include <stdint.h>
38#endif 38#endif
39 39
 40#ifndef SIZE_MAX
 41#define SIZE_MAX ((size_t)-1)
 42#endif
 43
40#define DEBUGGING 44#define DEBUGGING
41 45
42/* constants */ 46/* constants */
43 47
44#define MAXHUNKSIZE 100000 /* is this enough lines? */ 48#define MAXHUNKSIZE 100000 /* is this enough lines? */
45#define INITHUNKMAX 125 /* initial dynamic allocation size */ 49#define INITHUNKMAX 125 /* initial dynamic allocation size */
46#define MAXLINELEN 8192 50#define MAXLINELEN 8192
47#define BUFFERSIZE 1024 51#define BUFFERSIZE 1024
48 52
49#define SCCSPREFIX "s." 53#define SCCSPREFIX "s."
50#define GET "get -e %s" 54#define GET "get -e %s"
51#define SCCSDIFF "get -p %s | diff - %s >/dev/null" 55#define SCCSDIFF "get -p %s | diff - %s >/dev/null"
52 56