invoke.texi: fix typo.
[gcc.git] / libbacktrace / internal.h
index b1afca0a2d993d6b87fb67c63a60b4fd40d25892..1ea664a0bcdbc76bd628a7f414b7a147b591ea7e 100644 (file)
@@ -1,5 +1,5 @@
 /* internal.h -- Internal header file for stack backtrace library.
-   Copyright (C) 2012 Free Software Foundation, Inc.
+   Copyright (C) 2012-2013 Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Google.
 
 Redistribution and use in source and binary forms, with or without
@@ -109,10 +109,16 @@ struct backtrace_state
   struct backtrace_freelist_struct *freelist;
 };
 
-/* Open a file for reading.  Returns -1 on error.  */
+/* Open a file for reading.  Returns -1 on error.  If DOES_NOT_EXIST
+   is not NULL, *DOES_NOT_EXIST will be set to 0 normally and set to 1
+   if the file does not exist.  If the file does not exist and
+   DOES_NOT_EXIST is not NULL, the function will return -1 and will
+   not call ERROR_CALLBACK.  On other errors, or if DOES_NOT_EXIST is
+   NULL, the function will call ERROR_CALLBACK before returning.  */
 extern int backtrace_open (const char *filename,
                           backtrace_error_callback error_callback,
-                          void *data);
+                          void *data,
+                          int *does_not_exist);
 
 /* A view of the contents of a file.  This supports mmap when
    available.  A view will remain in memory even after backtrace_close