X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fsavewd.h;h=cd0817b7ced3b8ddd98f6046f8791dede6716610;hb=cd56634a4a8179fd5a4419fbb3e27211b042ab1c;hp=ee79c87d9c8eaba9c6a23be39d3e01573b453999;hpb=3030c5b5e0a5199e16b05927da72c43c42f211c3;p=gnulib.git diff --git a/lib/savewd.h b/lib/savewd.h index ee79c87d9..cd0817b7c 100644 --- a/lib/savewd.h +++ b/lib/savewd.h @@ -1,6 +1,6 @@ /* Save and restore the working directory, possibly using a subprocess. - Copyright (C) 2006, 2009 Free Software Foundation, Inc. + Copyright (C) 2006, 2009-2014 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 @@ -23,6 +23,14 @@ #include #include +#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 @@ -67,7 +75,7 @@ struct savewd }; /* Initialize a saved working directory object. */ -static inline void +SAVEWD_INLINE void savewd_init (struct savewd *wd) { wd->state = INITIAL_STATE; @@ -117,7 +125,7 @@ int savewd_chdir (struct savewd *wd, char const *dir, int options, 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); @@ -145,4 +153,6 @@ int savewd_process_files (int n_files, char **file, int (*act) (char *, struct savewd *, void *), void *options); +_GL_INLINE_HEADER_END + #endif