Imported Upstream version 1.8.7
[debian/sudo] / plugins / sudoers / regress / logging / check_wrap.c
index 33d7b9ddd7ef75d7d6de3f48baaf3e79fc9ea85f..0791fa384e3e600a5b343bb327f5d7074bc96330 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 2011-2013 Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
 # include <strings.h>
 #endif /* HAVE_STRINGS_H */
 
+#define SUDO_ERROR_WRAP 0
+
 #include "missing.h"
 #include "error.h"
+#include "sudo_plugin.h"
 
 extern void writeln_wrap(FILE *fp, char *line, size_t len, size_t maxlen);
 
+__dso_public int main(int argc, char *argv[]);
+
 static void
 usage(void)
 {
@@ -65,7 +70,7 @@ main(int argc, char *argv[])
 
     fp = fopen(argv[1], "r");
     if (fp == NULL)
-       errorx(1, "unable to open %s", argv[1]);
+       fatalx("unable to open %s", argv[1]);
 
     /*
      * Each test record consists of a log entry on one line and a list of
@@ -99,9 +104,3 @@ main(int argc, char *argv[])
 
     exit(0);
 }
-
-void
-cleanup(int gotsig)
-{
-    return;
-}