]> git.ozlabs.org Git - ccan/blobdiff - ccan/err/_info
err: actually implement replacement versions!
[ccan] / ccan / err / _info
index 5a5752bb0b297418486200661ec69db71d84dbdf..97bc0f9ed4ff03437804b2928326aa040d3e5665 100644 (file)
@@ -8,11 +8,15 @@
  * A few platforms don't provide err.h; for those, this provides replacements.
  * For most, it simple includes the system err.h.
  *
+ * Unfortunately, you have to call err_set_progname() to tell the replacements
+ * your program name, otherwise it prints "unknown program".
+ *
  * Example:
  *     #include <ccan/err/err.h>
  *
  *     int main(int argc, char *argv[])
  *     {
+ *             err_set_progname(argv[0]);
  *             if (argc != 1)
  *                     errx(1, "Expect no arguments");
  *             exit(0);