getcwd.c (dc36d6f9bb1753f3808552f3afd30eda9a7b206a) getcwd.c (e55512504d0178983978d64d67eed1cc85826523)
1/*-
2 * SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright (c) 1989, 1991, 1993, 1995
5 * The Regents of the University of California. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 26 unchanged lines hidden (view full) ---

35
36#include <dirent.h>
37#include <errno.h>
38#include <fcntl.h>
39#include <stdio.h>
40#include <stdlib.h>
41#include <string.h>
42#include <unistd.h>
1/*-
2 * SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright (c) 1989, 1991, 1993, 1995
5 * The Regents of the University of California. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 26 unchanged lines hidden (view full) ---

35
36#include <dirent.h>
37#include <errno.h>
38#include <fcntl.h>
39#include <stdio.h>
40#include <stdlib.h>
41#include <string.h>
42#include <unistd.h>
43#include <ssp/ssp.h>
43#include "un-namespace.h"
44
45#include "gen-private.h"
46
47#define ISDOT(dp) \
48 (dp->d_name[0] == '.' && (dp->d_name[1] == '\0' || \
49 (dp->d_name[1] == '.' && dp->d_name[2] == '\0')))
50
51extern int __getcwd(char *, size_t);
52
53char *
44#include "un-namespace.h"
45
46#include "gen-private.h"
47
48#define ISDOT(dp) \
49 (dp->d_name[0] == '.' && (dp->d_name[1] == '\0' || \
50 (dp->d_name[1] == '.' && dp->d_name[2] == '\0')))
51
52extern int __getcwd(char *, size_t);
53
54char *
54getcwd(char *pt, size_t size)
55__ssp_real(getcwd)(char *pt, size_t size)
55{
56 struct dirent *dp;
57 DIR *dir = NULL;
58 dev_t dev;
59 ino_t ino;
60 int first;
61 char *bpt;
62 struct stat s;

--- 164 unchanged lines hidden ---
56{
57 struct dirent *dp;
58 DIR *dir = NULL;
59 dev_t dev;
60 ino_t ino;
61 int first;
62 char *bpt;
63 struct stat s;

--- 164 unchanged lines hidden ---