OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [newlib-1.18.0/] [newlib-1.18.0-or32-1.0rc1/] [newlib/] [libc/] [sys/] [linux/] [getwd.c] - Blame information for rev 345

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 207 jeremybenn
#include <string.h>
2
#include <unistd.h>
3
#include <errno.h>
4
 
5
char *
6
getwd (char *buf)
7
{
8
  char tmp[MAXPATHLEN];
9
 
10
  if (buf == NULL)
11
    {
12
      errno = EINVAL;
13
      return NULL;
14
    }
15
 
16
  if (getcwd (tmp, MAXPATHLEN) == NULL)
17
    return NULL;
18
 
19
  return strncpy (buf, tmp, MAXPATHLEN);
20
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.