/* Save and restore the working directory, possibly using a subprocess.
- Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <stdbool.h>
#include <sys/types.h>
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
+_GL_INLINE_HEADER_BEGIN
+#ifndef SAVEWD_INLINE
+# define SAVEWD_INLINE _GL_INLINE
+#endif
+
/* A saved working directory. The member names and constants defined
by this structure are private to the savewd module. */
struct savewd
};
/* Initialize a saved working directory object. */
-static inline void
+SAVEWD_INLINE void
savewd_init (struct savewd *wd)
{
wd->state = INITIAL_STATE;
int savewd_restore (struct savewd *wd, int status);
/* Return WD's error number, or 0 if WD is not in an error state. */
-static inline int
+SAVEWD_INLINE int
savewd_errno (struct savewd const *wd)
{
return (wd->state == ERROR_STATE ? wd->val.errnum : 0);
int (*act) (char *, struct savewd *, void *),
void *options);
+_GL_INLINE_HEADER_END
+
#endif