Sun Sep 6 20:21:20 2015 UTC ()
Deal with systems defining swap16/swap32 as macros.


(joerg)
diff -r1.2 -r1.3 pkgsrc/security/netpgpverify/files/pgpsum.c

cvs diff -r1.2 -r1.3 pkgsrc/security/netpgpverify/files/pgpsum.c (expand / switch to unified diff)

--- pkgsrc/security/netpgpverify/files/pgpsum.c 2014/03/05 04:51:37 1.2
+++ pkgsrc/security/netpgpverify/files/pgpsum.c 2015/09/06 20:21:20 1.3
@@ -31,26 +31,29 @@ @@ -31,26 +31,29 @@
31#include <inttypes.h> 31#include <inttypes.h>
32#include <stdio.h> 32#include <stdio.h>
33#include <stdlib.h> 33#include <stdlib.h>
34#include <string.h> 34#include <string.h>
35#include <unistd.h> 35#include <unistd.h>
36 36
37#include "digest.h" 37#include "digest.h"
38#include "pgpsum.h" 38#include "pgpsum.h"
39 39
40#ifndef USE_ARG 40#ifndef USE_ARG
41#define USE_ARG(x) /*LINTED*/(void)&(x) 41#define USE_ARG(x) /*LINTED*/(void)&(x)
42#endif 42#endif
43 43
 44#undef swap16
 45#undef swap32
 46
44/* add the ascii armor line endings (except for last line) */ 47/* add the ascii armor line endings (except for last line) */
45static size_t 48static size_t
46don_armor(digest_t *hash, uint8_t *in, size_t insize, int doarmor) 49don_armor(digest_t *hash, uint8_t *in, size_t insize, int doarmor)
47{ 50{
48 uint8_t *from; 51 uint8_t *from;
49 uint8_t *newp; 52 uint8_t *newp;
50 uint8_t *p; 53 uint8_t *p;
51 uint8_t dos_line_end[2]; 54 uint8_t dos_line_end[2];
52 55
53 dos_line_end[0] = '\r'; 56 dos_line_end[0] = '\r';
54 dos_line_end[1] = '\n'; 57 dos_line_end[1] = '\n';
55 for (from = in ; (p = memchr(from, '\n', insize - (size_t)(from - in))) != NULL ; from = p + 1) { 58 for (from = in ; (p = memchr(from, '\n', insize - (size_t)(from - in))) != NULL ; from = p + 1) {
56 for (newp = p ; doarmor == 'w' && newp > from ; --newp) { 59 for (newp = p ; doarmor == 'w' && newp > from ; --newp) {