Home
last modified time | relevance | path

Searched refs:cwd (Results 1 – 25 of 340) sorted by relevance

12345678910>>...14

/netbsd-src/external/gpl2/xcvs/dist/lib/
H A Dsave-cwd.c80 save_cwd (struct saved_cwd *cwd) in save_cwd() argument
82 cwd->name = NULL; in save_cwd()
84 cwd->desc = fd_safer (open (".", O_RDONLY)); in save_cwd()
85 if (cwd->desc < 0) in save_cwd()
87 cwd->desc = fd_safer (open (".", O_WRONLY)); in save_cwd()
88 if (cwd->desc < 0) in save_cwd()
90 cwd->name = xgetcwd (); in save_cwd()
91 return cwd->name ? 0 : -1; in save_cwd()
103 restore_cwd (const struct saved_cwd *cwd) in restore_cwd() argument
105 if (0 <= cwd->desc) in restore_cwd()
[all …]
/netbsd-src/external/gpl3/gdb/dist/gnulib/import/
H A Dsave-cwd.c62 save_cwd (struct saved_cwd *cwd) in save_cwd() argument
64 cwd->name = NULL; in save_cwd()
66 cwd->desc = open (".", O_SEARCH | O_CLOEXEC); in save_cwd()
68 cwd->desc = fd_safer_flag (cwd->desc, O_CLOEXEC); in save_cwd()
69 if (cwd->desc < 0) in save_cwd()
71 cwd->name = getcwd (NULL, 0); in save_cwd()
72 return cwd->name ? 0 : -1; in save_cwd()
83 restore_cwd (const struct saved_cwd *cwd) in restore_cwd() argument
85 if (0 <= cwd->desc) in restore_cwd()
86 return fchdir (cwd->desc); in restore_cwd()
[all …]
H A Dfdopendir.c110 struct saved_cwd cwd; in fdopendir() local
111 if (save_cwd (&cwd) != 0) in fdopendir()
113 dir = fdopendir_with_dup (fd, -1, &cwd); in fdopendir()
115 free_cwd (&cwd); in fdopendir()
136 fdopendir_with_dup (int fd, int older_dupfd, struct saved_cwd const *cwd) in fdopendir_with_dup() argument
149 dir = fdopendir_with_dup (fd, dupfd, cwd); in fdopendir_with_dup()
155 dir = fd_clone_opendir (dupfd, cwd); in fdopendir_with_dup()
176 fd_clone_opendir (int fd, struct saved_cwd const *cwd) in fd_clone_opendir() argument
178 if (REPLACE_FCHDIR || ! cwd) in fd_clone_opendir()
218 if (restore_cwd (cwd) != 0) in fd_clone_opendir()
H A Dfchdir.c92 char *cwd; in get_name() local
99 cwd = getcwd (NULL, 0); in get_name()
100 if (!cwd || (dir[0] == '.' && dir[1] == '\0')) in get_name()
101 return cwd; in get_name()
103 result = mfile_name_concat (cwd, dir, NULL); in get_name()
104 free (cwd); in get_name()
/netbsd-src/external/gpl2/xcvs/dist/src/
H A Drelease.c148 struct saved_cwd cwd; in release() local
202 if (save_cwd (&cwd)) in release()
223 if (restore_cwd (&cwd)) in release()
226 cwd.name); in release()
275 if (restore_cwd (&cwd)) in release()
278 cwd.name); in release()
296 if (restore_cwd (&cwd)) in release()
299 cwd.name); in release()
305 if (restore_cwd (&cwd)) in release()
308 cwd.name); in release()
[all …]
H A Dadd.c66 struct saved_cwd cwd; in add() local
208 if (save_cwd (&cwd)) in add()
255 if (restore_cwd (&cwd)) in add()
258 cwd.name); in add()
259 free_cwd (&cwd); in add()
298 if (save_cwd (&cwd)) in add()
732 if (restore_cwd (&cwd)) in add()
734 cwd.name); in add()
735 free_cwd (&cwd); in add()
773 struct saved_cwd cwd; in add_directory() local
[all …]
/netbsd-src/external/gpl3/gcc/dist/libgfortran/intrinsics/
H A Dgetcwd.c41 getcwd_i4_sub (char *cwd, GFC_INTEGER_4 *status, gfc_charlen_type cwd_len) in getcwd_i4_sub() argument
45 if (getcwd (cwd, cwd_len)) in getcwd_i4_sub()
47 size_t len = strlen (cwd); in getcwd_i4_sub()
48 memset (cwd + len, ' ', cwd_len - len); in getcwd_i4_sub()
59 memcpy (cwd, buf, cwd_len); in getcwd_i4_sub()
69 memset (cwd, ' ', cwd_len); in getcwd_i4_sub()
79 getcwd_i8_sub (char *cwd, GFC_INTEGER_8 *status, gfc_charlen_type cwd_len) in getcwd_i8_sub() argument
82 getcwd_i4_sub (cwd, &status4, cwd_len); in getcwd_i8_sub()
91 PREFIX(getcwd) (char *cwd, gfc_charlen_type cwd_len) in PREFIX()
94 getcwd_i4_sub (cwd, &status, cwd_len); in PREFIX()
/netbsd-src/external/gpl3/gcc.old/dist/libgfortran/intrinsics/
H A Dgetcwd.c41 getcwd_i4_sub (char *cwd, GFC_INTEGER_4 *status, gfc_charlen_type cwd_len) in getcwd_i4_sub() argument
45 if (getcwd (cwd, cwd_len)) in getcwd_i4_sub()
47 size_t len = strlen (cwd); in getcwd_i4_sub()
48 memset (cwd + len, ' ', cwd_len - len); in getcwd_i4_sub()
59 memcpy (cwd, buf, cwd_len); in getcwd_i4_sub()
69 memset (cwd, ' ', cwd_len); in getcwd_i4_sub()
79 getcwd_i8_sub (char *cwd, GFC_INTEGER_8 *status, gfc_charlen_type cwd_len) in getcwd_i8_sub() argument
82 getcwd_i4_sub (cwd, &status4, cwd_len); in getcwd_i8_sub()
91 PREFIX(getcwd) (char *cwd, gfc_charlen_type cwd_len) in PREFIX()
94 getcwd_i4_sub (cwd, &status, cwd_len); in PREFIX()
/netbsd-src/external/apache2/llvm/dist/libcxx/utils/libcxx/
H A Dcompiler.py155 def preprocess(self, source_files, out=None, flags=[], cwd=None): argument
158 cwd=cwd)
161 def compile(self, source_files, out=None, flags=[], cwd=None): argument
164 cwd=cwd)
167 def link(self, source_files, exec_path=None, flags=[], cwd=None): argument
170 cwd=cwd)
171 cs_cmd, cs_out, cs_err, cs_rc = self.codesign(exec_path, cwd)
177 cwd=None): argument
180 cwd=cwd)
181 cs_cmd, cs_out, cs_err, cs_rc = self.codesign(exec_path, cwd)
[all …]
/netbsd-src/external/bsd/less/dist/lesstest/
H A Druntest24 my $cwd = getcwd();
25 my $srcdir = ($opt{d} or $cwd);
26 $rundir = (rfile($opt{r}, $cwd) or "$srcdir/.runtest_dir");
27 $lesstest = (rfile($opt{t}, $cwd) or "$srcdir/lesstest");
28 $lt_screen = (rfile($opt{s}, $cwd) or "$srcdir/lt_screen");
29 $less = (rfile($opt{l}, $cwd) or "$srcdir/../obj/less");
43 $errs += run(rfile($file, $cwd));
97 my ($file, $cwd) = @_;
99 $file = "$cwd/$file" unless $file =~ m|^/|;
/netbsd-src/external/bsd/pkg_install/dist/lib/
H A Dremove.c63 safe_fchdir(int cwd) in safe_fchdir() argument
68 rv = fchdir(cwd); in safe_fchdir()
115 recursive_remove_internal(const char *path, int missing_ok, int cwd) in recursive_remove_internal() argument
137 if (did_chdir && safe_fchdir(cwd) == -1 && rv == 0) in recursive_remove_internal()
148 if (did_chdir && fchdir(cwd) == -1) in recursive_remove_internal()
159 rv = recursive_remove_internal(subdir, 1, cwd); in recursive_remove_internal()
165 safe_fchdir(cwd); in recursive_remove_internal()
169 if (did_chdir && safe_fchdir(cwd) == -1 && rv == 0) in recursive_remove_internal()
/netbsd-src/external/bsd/less/dist/
H A Dlsystem.c56 char cwd[FILENAME_MAX+1]; in lsystem() local
85 getcwd(cwd, FILENAME_MAX); in lsystem()
205 chdir(cwd); in lsystem()
211 if (cwd[1] == ':') in lsystem()
213 if (cwd[0] >= 'a' && cwd[0] <= 'z') in lsystem()
214 setdisk(cwd[0] - 'a'); in lsystem()
215 else if (cwd[0] >= 'A' && cwd[0] <= 'Z') in lsystem()
216 setdisk(cwd[0] - 'A'); in lsystem()
/netbsd-src/tests/lib/libc/c063/
H A Dt_faccessat.c125 char cwd[MAXPATHLEN]; in ATF_TC_BODY() local
131 ATF_REQUIRE((dfd = open(getcwd(cwd, MAXPATHLEN), O_RDONLY, 0)) != -1); in ATF_TC_BODY()
183 char cwd[MAXPATHLEN]; in ATF_TC_BODY() local
190 ATF_REQUIRE(getcwd(cwd, MAXPATHLEN)); in ATF_TC_BODY()
191 snprintf(abs_path, sizeof(abs_path), "%s/%s", cwd, FILE); in ATF_TC_BODY()
205 char cwd[MAXPATHLEN]; in ATF_TC_BODY() local
212 ATF_REQUIRE(getcwd(cwd, MAXPATHLEN)); in ATF_TC_BODY()
213 snprintf(abs_path, sizeof(abs_path), "%s/%s", cwd, DIR); in ATF_TC_BODY()
226 char cwd[MAXPATHLEN]; in ATF_TC_BODY() local
231 ATF_REQUIRE(getcwd(cwd, MAXPATHLEN)); in ATF_TC_BODY()
[all …]
/netbsd-src/external/gpl3/gcc/dist/libgcc/config/i386/
H A Dcrtprec.c40 unsigned short int cwd; in set_precision() local
42 asm volatile ("fnstcw\t%0" : "=m" (cwd)); in set_precision()
44 cwd &= ~X87CW_PCMASK; in set_precision()
45 cwd |= X87CW; in set_precision()
47 asm volatile ("fldcw\t%0" : : "m" (cwd)); in set_precision()
/netbsd-src/external/gpl3/gcc.old/dist/libgcc/config/i386/
H A Dcrtprec.c40 unsigned short int cwd; in set_precision() local
42 asm volatile ("fnstcw\t%0" : "=m" (cwd)); in set_precision()
44 cwd &= ~X87CW_PCMASK; in set_precision()
45 cwd |= X87CW; in set_precision()
47 asm volatile ("fldcw\t%0" : : "m" (cwd)); in set_precision()
/netbsd-src/external/bsd/pkg_install/dist/create/
H A Dpl.c92 char *cwd = NULL; in check_list() local
99 cwd = p->name; in check_list()
108 if (cwd == NULL) in check_list()
114 if (cwd == NULL) in check_list()
117 cwd, in check_list()
118 (strcmp(cwd, "/") == 0) ? "" : "/", in check_list()
130 CheckSymlink(name, cwd, strlen(cwd)); in check_list()
/netbsd-src/external/bsd/tmux/dist/
H A Dspawn.c213 char **argv, *cp, **argvp, *argv0, *cwd, *new_cwd; in spawn_pane() local
229 if (sc->cwd != NULL) { in spawn_pane()
230 cwd = format_single(item, sc->cwd, c, target->s, NULL, NULL); in spawn_pane()
231 if (*cwd != '/') { in spawn_pane()
233 target->s), cwd); in spawn_pane()
234 free(cwd); in spawn_pane()
235 cwd = new_cwd; in spawn_pane()
238 cwd = xstrdup(server_client_get_cwd(c, target->s)); in spawn_pane()
240 cwd = NULL; in spawn_pane()
252 free(cwd); in spawn_pane()
[all …]
/netbsd-src/lib/libpam/modules/pam_chroot/
H A Dpam_chroot.c62 const char *dir, *end, *cwd, *user; in pam_sm_open_session() local
84 cwd = end + 2; in pam_sm_open_session()
86 if ((cwd = openpam_get_option(pamh, "cwd")) == NULL) in pam_sm_open_session()
87 cwd = "/"; in pam_sm_open_session()
103 if (chdir(cwd) == -1) { in pam_sm_open_session()
107 pam_setenv(pamh, "HOME", cwd, 1); in pam_sm_open_session()
/netbsd-src/external/apache2/llvm/dist/libcxx/utils/
H A Dmerge_archives.py45 def execute_command(cmd, cwd=None): argument
53 'cwd': cwd,
64 def execute_command_verbose(cmd, cwd=None, verbose=False): argument
68 out, err, exitCode = execute_command(cmd, cwd=cwd)
140 cwd=temp_directory_root, verbose=args.verbose)
147 cwd=temp_directory_root, verbose=args.verbose)
150 cwd=temp_directory_root, verbose=args.verbose)
/netbsd-src/external/apache2/llvm/dist/llvm/utils/unittest/googletest/src/
H A Dgtest-filepath.cc101 char cwd[GTEST_PATH_MAX_ + 1] = { '\0' }; in GetCurrentDir()
102 return FilePath(_getcwd(cwd, sizeof(cwd)) == nullptr ? "" : cwd); in GetCurrentDir()
104 char cwd[GTEST_PATH_MAX_ + 1] = { '\0' }; in GetCurrentDir()
105 char* result = getcwd(cwd, sizeof(cwd)); in GetCurrentDir()
110 return FilePath(result == nullptr ? kCurrentDirectoryString : cwd); in GetCurrentDir()
112 return FilePath(result == nullptr ? "" : cwd); in GetCurrentDir()
/netbsd-src/external/apache2/llvm/dist/llvm/utils/lit/lit/
H A DTestRunner.py59 def __init__(self, cwd, env): argument
60 self.cwd = cwd
169 def expand_glob(arg, cwd): argument
171 return sorted(arg.resolve(cwd))
174 def expand_glob_expressions(args, cwd): argument
177 result.extend(expand_glob(arg, cwd))
278 shenv.cwd = newdir
280 shenv.cwd = os.path.realpath(os.path.join(shenv.cwd, newdir))
356 args = expand_glob_expressions(cmd.args, cmd_shenv.cwd)[1:]
375 cwd = cmd_shenv.cwd
[all …]
/netbsd-src/external/mit/libuv/dist/src/win/
H A Dprocess.c168 const WCHAR* cwd, in search_path_join_test() argument
186 if (cwd_len < 2 || _wcsnicmp(cwd, dir, 2) != 0) { in search_path_join_test()
204 wcsncpy(result_pos, cwd, cwd_len); in search_path_join_test()
261 WCHAR *cwd, in path_search_walk_ext() argument
271 cwd, cwd_len); in path_search_walk_ext()
281 cwd, cwd_len); in path_search_walk_ext()
290 cwd, cwd_len); in path_search_walk_ext()
343 WCHAR *cwd, in search_path() argument
354 size_t cwd_len = wcslen(cwd); in search_path()
384 cwd, cwd_len, in search_path()
[all …]
/netbsd-src/bin/csh/
H A Ddir.c117 const char *cwd; in dinit() local
122 if ((cwd = getenv("PWD")) != NULL) { in dinit()
123 if (stat(cwd, &shp) != -1 && swd.st_dev == shp.st_dev && in dinit()
125 ecp = cwd; in dinit()
280 Char *dp, *cwd; in dnormalize() local
282 cwd = xreallocarray(NULL, (size_t)(Strlen(dcwd->di_name) + 3), in dnormalize()
284 (void)Strcpy(cwd, dcwd->di_name); in dnormalize()
304 dp = Strrchr(cwd, '/'); in dnormalize()
314 cwd[dotdot = Strlen(cwd)] = '/'; in dnormalize()
315 cwd[dotdot + 1] = '\0'; in dnormalize()
[all …]
/netbsd-src/external/gpl2/gettext/dist/gnulib-local/lib/
H A Dxgetcwd.c66 char *cwd = (char *) xmalloc (path_max); in xgetcwd() local
69 ret = getcwd (cwd, path_max); in xgetcwd()
75 free (cwd); in xgetcwd()
80 free (cwd); in xgetcwd()
/netbsd-src/external/bsd/kyua-cli/dist/utils/fs/
H A Doperations.cpp97 char* cwd; in current_path() local
99 cwd = ::getcwd(NULL, 0); in current_path()
101 cwd = ::getcwd(NULL, MAXPATHLEN); in current_path()
103 if (cwd == NULL) { in current_path()
110 const fs::path result(cwd); in current_path()
111 std::free(cwd); in current_path()
114 std::free(cwd); in current_path()

12345678910>>...14