Deleted Added
full compact
getwd.c (142652) getwd.c (142680)
1/*-
2 * Copyright (c) 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 */
33
34#if defined(LIBC_SCCS) && !defined(lint)
35static char sccsid[] = "@(#)getwd.c 8.1 (Berkeley) 6/2/93";
36#endif /* LIBC_SCCS and not lint */
37#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 */
33
34#if defined(LIBC_SCCS) && !defined(lint)
35static char sccsid[] = "@(#)getwd.c 8.1 (Berkeley) 6/2/93";
36#endif /* LIBC_SCCS and not lint */
37#include <sys/cdefs.h>
38__FBSDID("$FreeBSD: head/lib/libc/compat-43/getwd.c 142652 2005-02-27 14:51:27Z phantom $");
38__FBSDID("$FreeBSD: head/lib/libc/compat-43/getwd.c 142680 2005-02-27 18:39:02Z phantom $");
39
40#include <sys/param.h>
41#include <unistd.h>
42#include <errno.h>
43#include <stdio.h>
39
40#include <sys/param.h>
41#include <unistd.h>
42#include <errno.h>
43#include <stdio.h>
44#include <string.h>
44
45char *
46getwd(char *buf)
47{
48 char *p;
49
50 if ( (p = getcwd(buf, MAXPATHLEN)) )
51 return(p);
52 (void)strerror_r(errno, buf, MAXPATHLEN);
53 return((char *)NULL);
54}
45
46char *
47getwd(char *buf)
48{
49 char *p;
50
51 if ( (p = getcwd(buf, MAXPATHLEN)) )
52 return(p);
53 (void)strerror_r(errno, buf, MAXPATHLEN);
54 return((char *)NULL);
55}