libnosys (chown, readlink, symlink) [PATCH]

Jeff Johnston jjohnstn@redhat.com
Thu Dec 1 18:03:00 GMT 2005


Patch applied.

-- Jeff J.

Shaun Jackman wrote:
> This patch adds chown, readlink, and symlink to libnosys.
> 
> Cheers,
> Shaun
> 
> 2005-11-28  Shaun Jackman  <sjackman@gmail.com>
> 
> 	* libnosys/Makefile.in (OBJS): Add chown, readlink, and symlink.
> 	* libnosys/chown.c: New file.
> 	* libnosys/readlink.c: New file.
> 	* libnosys/symlink.c: New file.
> 
> ================================================================================
> --- Makefile.in	eb8917690b3f917009681298853302f7e9d44b3f
> +++ Makefile.in	ac0f237f8f366d12e6dc0c52ef6a74d439c3bb34
> @@ -65,9 +65,10 @@
>  	else t='$(program_transform_name)'; echo objcopy | sed -e $$t ; fi`
> 
>  # object files needed
> -OBJS = close.o environ.o errno.o execve.o fork.o fstat.o getpid.o gettod.o \
> -	isatty.o kill.o link.o lseek.o open.o read.o sbrk.o stat.o \
> -	times.o unlink.o wait.o write.o _exit.o
> +OBJS = chown.o close.o environ.o errno.o execve.o fork.o fstat.o \
> +	getpid.o gettod.o isatty.o kill.o link.o lseek.o open.o \
> +	read.o readlink.o sbrk.o stat.o symlink.o times.o unlink.o \
> +	wait.o write.o _exit.o
> 
>  # Object files specific to particular targets.
>  EVALOBJS = ${OBJS}
> ================================================================================
> --- chown.c	
> +++ chown.c	b87bac7b4e4b05a12fd176b6092ae986ea1e3264
> @@ -0,0 +1,24 @@
> +/*
> + * Stub version of chown.
> + */
> +
> +#include "config.h"
> +#include <_ansi.h>
> +#include <_syslist.h>
> +#include <errno.h>
> +#include <sys/types.h>
> +#undef errno
> +extern int errno;
> +#include "warning.h"
> +
> +int
> +_DEFUN (_chown, (path, owner, group),
> +        const char *path  _AND
> +        uid_t owner _AND
> +        gid_t group)
> +{
> +  errno = ENOSYS;
> +  return -1;
> +}
> +
> +stub_warning(_chown)
> ================================================================================
> --- readlink.c	
> +++ readlink.c	c2922a4cbaec965edade4df7074c6ef8332b51f9
> @@ -0,0 +1,24 @@
> +/*
> + * Stub version of readlink.
> + */
> +
> +#include "config.h"
> +#include <_ansi.h>
> +#include <_syslist.h>
> +#include <errno.h>
> +#include <sys/types.h>
> +#undef errno
> +extern int errno;
> +#include "warning.h"
> +
> +int
> +_DEFUN (_readlink, (path, buf, bufsize),
> +        const char *path _AND
> +        char *buf _AND
> +        size_t bufsize)
> +{
> +  errno = ENOSYS;
> +  return -1;
> +}
> +
> +stub_warning(_readlink)
> ================================================================================
> --- symlink.c	
> +++ symlink.c	7a82c7b88b4f350862fee6ad217f80409ca6e624
> @@ -0,0 +1,22 @@
> +/*
> + * Stub version of symlink.
> + */
> +
> +#include "config.h"
> +#include <_ansi.h>
> +#include <_syslist.h>
> +#include <errno.h>
> +#undef errno
> +extern int errno;
> +#include "warning.h"
> +
> +int
> +_DEFUN (_symlink, (path1, path2),
> +        const char *path1 _AND
> +        const char *path2)
> +{
> +  errno = ENOSYS;
> +  return -1;
> +}
> +
> +stub_warning(_symlink)



More information about the Newlib mailing list