Module Name:    othersrc
Committed By:   agc
Date:           Thu Oct 13 17:20:47 UTC 2011

Modified Files:
        othersrc/external/bsd/mat/dist: mat.c mat.h

Log Message:
provide namespace protection for header file

fix an error message


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 othersrc/external/bsd/mat/dist/mat.c
cvs rdiff -u -r1.4 -r1.5 othersrc/external/bsd/mat/dist/mat.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: othersrc/external/bsd/mat/dist/mat.c
diff -u othersrc/external/bsd/mat/dist/mat.c:1.3 othersrc/external/bsd/mat/dist/mat.c:1.4
--- othersrc/external/bsd/mat/dist/mat.c:1.3	Sat Jun 25 17:05:34 2011
+++ othersrc/external/bsd/mat/dist/mat.c	Thu Oct 13 17:20:47 2011
@@ -523,7 +523,7 @@ extract_special(mat_t *mat, extract_t *a
 			return 0;
 		}
 		if (mknod(name, ent->meta.mode & 07777, ent->meta.dev) < 0) {
-			(void) fprintf(stderr, "can't mkdir '%s'\n", name);
+			(void) fprintf(stderr, "can't mknod '%s'\n", name);
 			return 0;
 		}
 		if (archive->preserve && !fpreserve(-1, NULL, name, ent)) {

Index: othersrc/external/bsd/mat/dist/mat.h
diff -u othersrc/external/bsd/mat/dist/mat.h:1.4 othersrc/external/bsd/mat/dist/mat.h:1.5
--- othersrc/external/bsd/mat/dist/mat.h:1.4	Sat Jun 25 17:05:34 2011
+++ othersrc/external/bsd/mat/dist/mat.h	Thu Oct 13 17:20:47 2011
@@ -30,6 +30,18 @@
 #include <inttypes.h>
 #include <stdio.h>
 
+#ifndef __BEGIN_DECLS
+#  if defined(__cplusplus)
+#  define __BEGIN_DECLS           extern "C" {
+#  define __END_DECLS             }
+#  else
+#  define __BEGIN_DECLS
+#  define __END_DECLS
+#  endif
+#endif
+
+__BEGIN_DECLS
+
 enum {
 	MAT_MAGIC		= 0x19980626,
 	MAT_NAME_LEN		= 32,
@@ -52,6 +64,9 @@ typedef struct matmeta_t {
 	uint32_t	 namelen;		/* size of name */
 	uint32_t	 linklen;		/* size of link target */
 	uint32_t	 flags;			/* fs flags */
+#if 0
+	uint32_t	 xasize;		/* extattr size */
+#endif
 	char		 type;			/* single char type */
 } matmeta_t;
 
@@ -60,6 +75,9 @@ typedef struct matent_t {
 	matmeta_t	 meta;			/* meta data */
 	char		*name;			/* name of entry */
 	uint8_t		*data;			/* associated data */
+#if 0
+	uint8_t		*extattrs;		/* extended attributes */
+#endif
 	uint8_t		 digest[MAT_DIGEST_LEN]; /* sha256 */
 } matent_t;
 
@@ -68,7 +86,7 @@ typedef struct matlink_t {
 	uint64_t	 ino;			/* inode number */
 	char		*name;			/* name of primary */
 	uint32_t	 namelen;		/* length of name */
-	uint8_t		 digest[MAT_DIGEST_LEN]; /* sha256 */
+	uint8_t		 digest[MAT_DIGEST_LEN]; /* digest of contents */
 } matlink_t;
 
 /* the header for the archive file */
@@ -110,4 +128,6 @@ int mat_vtar(char */*arg*/, ...);
 int mat_pax(int /*argc*/, char **/*argv*/);
 int mat_vpax(char */*arg*/, ...);
 
+__END_DECLS
+
 #endif

Reply via email to