OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.17.0/] [newlib/] [libc/] [sys/] [linux/] [getwd.c] - Blame information for rev 262

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 148 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.