aboutsummaryrefslogtreecommitdiffstats
path: root/ports/unix/guts/getwd.c
blob: bc99f936ac5ce36dba6fcd63e9db1b054bbafd4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* 
 * Copyright (c) 2008-2010 Wind River Systems; see
 * guts/COPYRIGHT for information.
 *
 * SPDX-License-Identifier: LGPL-2.1-only
 *
 * static char *
 * wrap_getwd(char *buf) {
 *	char * rc = NULL;
 */

	pseudo_debug(PDBGF_CLIENT, "getwd (getcwd)\n");
	rc = wrap_getcwd(buf, pseudo_path_max());
	/* because it would violate everything we have ever known about
	 * UNIX for these functions to have the same errno semantics,
	 * that's why.
	 */
	if (rc == NULL && errno == ERANGE	)
		errno = ENAMETOOLONG;

/*	return rc;
 * }
 */