1 /* Do not save and restore the current working directory.
3 Copyright 2013 Free Software Foundation, Inc.
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
18 /* Gnulib needs to save and restore the current working directory to
19 fully emulate functions like fstatat. But Emacs doesn't care what
20 the current working directory is; it always uses absolute file
21 names. This module replaces the Gnulib module by omitting the code
22 that Emacs does not need. */
27 _GL_INLINE_HEADER_BEGIN
28 #ifndef SAVE_CWD_INLINE
29 # define SAVE_CWD_INLINE _GL_INLINE
32 struct saved_cwd
{ int desc
; };
35 save_cwd (struct saved_cwd
*cwd
)
41 SAVE_CWD_INLINE
int restore_cwd (struct saved_cwd
const *cwd
) { return 0; }
42 SAVE_CWD_INLINE
void free_cwd (struct saved_cwd
*cwd
) { }