diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2007-06-13 21:55:28 +0400 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2007-06-13 21:55:28 +0400 |
commit | c33ff7855e85a47e3b08b5e971d7110207e4a55b (patch) | |
tree | f3435178e25b89486a2fd18f21523864719d96ab /newlib/libc/machine/spu | |
parent | ae473bdc48f84566747813f185aae709d6119e0d (diff) |
2007-06-13 Patrick Mansfield <patmans@us.ibm.com>
* libc/machine/spu/creat.c: New file copied from libc/posix/creat.c,
it just calls open with appropriate arguments.
* libc/machine/spu/Makefile.am: Add creat.c.
* libc/machine/spu/Makefile.in: Regenerate.
Diffstat (limited to 'newlib/libc/machine/spu')
-rw-r--r-- | newlib/libc/machine/spu/Makefile.am | 2 | ||||
-rw-r--r-- | newlib/libc/machine/spu/Makefile.in | 91 | ||||
-rw-r--r-- | newlib/libc/machine/spu/creat.c | 15 |
3 files changed, 65 insertions, 43 deletions
diff --git a/newlib/libc/machine/spu/Makefile.am b/newlib/libc/machine/spu/Makefile.am index 7624c6774..ef5323953 100644 --- a/newlib/libc/machine/spu/Makefile.am +++ b/newlib/libc/machine/spu/Makefile.am @@ -8,7 +8,7 @@ noinst_LIBRARIES = lib.a AM_CCASFLAGS = $(INCLUDES) -lib_a_SOURCES = setjmp.S clearerr.c fclose.c feof.c ferror.c fflush.c \ +lib_a_SOURCES = setjmp.S clearerr.c creat.c fclose.c feof.c ferror.c fflush.c \ fgetc.c fgetpos.c fgets.c fileno.c fiprintf.c fiscanf.c fopen.c \ fprintf.c fputc.c fputs.c fread.c freopen.c fscanf.c fseek.c \ fsetpos.c ftell.c fwrite.c getc.c getchar.c gets.c iprintf.c \ diff --git a/newlib/libc/machine/spu/Makefile.in b/newlib/libc/machine/spu/Makefile.in index cae855097..96e837ede 100644 --- a/newlib/libc/machine/spu/Makefile.in +++ b/newlib/libc/machine/spu/Makefile.in @@ -80,7 +80,7 @@ DIST_COMMON = $(srcdir)/../../../../config.guess \ $(srcdir)/../../../../compile $(srcdir)/../../../../compile \ $(srcdir)/../../../../compile $(srcdir)/../../../../compile \ $(srcdir)/../../../../compile $(srcdir)/../../../../compile \ - $(srcdir)/../../../../compile + $(srcdir)/../../../../compile $(srcdir)/../../../../compile subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../../../acinclude.m4 \ @@ -96,46 +96,47 @@ ARFLAGS = cru lib_a_AR = $(AR) $(ARFLAGS) lib_a_LIBADD = am_lib_a_OBJECTS = lib_a-setjmp.$(OBJEXT) lib_a-clearerr.$(OBJEXT) \ - lib_a-fclose.$(OBJEXT) lib_a-feof.$(OBJEXT) \ - lib_a-ferror.$(OBJEXT) lib_a-fflush.$(OBJEXT) \ - lib_a-fgetc.$(OBJEXT) lib_a-fgetpos.$(OBJEXT) \ - lib_a-fgets.$(OBJEXT) lib_a-fileno.$(OBJEXT) \ - lib_a-fiprintf.$(OBJEXT) lib_a-fiscanf.$(OBJEXT) \ - lib_a-fopen.$(OBJEXT) lib_a-fprintf.$(OBJEXT) \ - lib_a-fputc.$(OBJEXT) lib_a-fputs.$(OBJEXT) \ - lib_a-fread.$(OBJEXT) lib_a-freopen.$(OBJEXT) \ - lib_a-fscanf.$(OBJEXT) lib_a-fseek.$(OBJEXT) \ - lib_a-fsetpos.$(OBJEXT) lib_a-ftell.$(OBJEXT) \ - lib_a-fwrite.$(OBJEXT) lib_a-getc.$(OBJEXT) \ - lib_a-getchar.$(OBJEXT) lib_a-gets.$(OBJEXT) \ - lib_a-iprintf.$(OBJEXT) lib_a-iscanf.$(OBJEXT) \ - lib_a-memcpy.$(OBJEXT) lib_a-memmove.$(OBJEXT) \ - lib_a-memset.$(OBJEXT) lib_a-mktemp.$(OBJEXT) \ - lib_a-perror.$(OBJEXT) lib_a-printf.$(OBJEXT) \ - lib_a-putc.$(OBJEXT) lib_a-putchar.$(OBJEXT) \ - lib_a-puts.$(OBJEXT) lib_a-remove.$(OBJEXT) \ - lib_a-rename.$(OBJEXT) lib_a-rewind.$(OBJEXT) \ - lib_a-scanf.$(OBJEXT) lib_a-setbuf.$(OBJEXT) \ - lib_a-setvbuf.$(OBJEXT) lib_a-siprintf.$(OBJEXT) \ - lib_a-siscanf.$(OBJEXT) lib_a-sleep.$(OBJEXT) \ - lib_a-sniprintf.$(OBJEXT) lib_a-snprintf.$(OBJEXT) \ - lib_a-sprintf.$(OBJEXT) lib_a-sscanf.$(OBJEXT) \ - lib_a-stdio.$(OBJEXT) lib_a-strcat.$(OBJEXT) \ - lib_a-strchr.$(OBJEXT) lib_a-strcmp.$(OBJEXT) \ - lib_a-strcpy.$(OBJEXT) lib_a-strcspn.$(OBJEXT) \ - lib_a-strlen.$(OBJEXT) lib_a-strncat.$(OBJEXT) \ - lib_a-strncmp.$(OBJEXT) lib_a-strncpy.$(OBJEXT) \ - lib_a-strpbrk.$(OBJEXT) lib_a-strrchr.$(OBJEXT) \ - lib_a-strspn.$(OBJEXT) lib_a-strxfrm.$(OBJEXT) \ - lib_a-tmpfile.$(OBJEXT) lib_a-tmpnam.$(OBJEXT) \ - lib_a-ungetc.$(OBJEXT) lib_a-usleep.$(OBJEXT) \ - lib_a-vfiprintf.$(OBJEXT) lib_a-vfiscanf.$(OBJEXT) \ - lib_a-vfprintf.$(OBJEXT) lib_a-vfscanf.$(OBJEXT) \ - lib_a-viprintf.$(OBJEXT) lib_a-viscanf.$(OBJEXT) \ - lib_a-vprintf.$(OBJEXT) lib_a-vscanf.$(OBJEXT) \ - lib_a-vsiprintf.$(OBJEXT) lib_a-vsiscanf.$(OBJEXT) \ - lib_a-vsniprintf.$(OBJEXT) lib_a-vsnprintf.$(OBJEXT) \ - lib_a-vsprintf.$(OBJEXT) lib_a-vsscanf.$(OBJEXT) + lib_a-creat.$(OBJEXT) lib_a-fclose.$(OBJEXT) \ + lib_a-feof.$(OBJEXT) lib_a-ferror.$(OBJEXT) \ + lib_a-fflush.$(OBJEXT) lib_a-fgetc.$(OBJEXT) \ + lib_a-fgetpos.$(OBJEXT) lib_a-fgets.$(OBJEXT) \ + lib_a-fileno.$(OBJEXT) lib_a-fiprintf.$(OBJEXT) \ + lib_a-fiscanf.$(OBJEXT) lib_a-fopen.$(OBJEXT) \ + lib_a-fprintf.$(OBJEXT) lib_a-fputc.$(OBJEXT) \ + lib_a-fputs.$(OBJEXT) lib_a-fread.$(OBJEXT) \ + lib_a-freopen.$(OBJEXT) lib_a-fscanf.$(OBJEXT) \ + lib_a-fseek.$(OBJEXT) lib_a-fsetpos.$(OBJEXT) \ + lib_a-ftell.$(OBJEXT) lib_a-fwrite.$(OBJEXT) \ + lib_a-getc.$(OBJEXT) lib_a-getchar.$(OBJEXT) \ + lib_a-gets.$(OBJEXT) lib_a-iprintf.$(OBJEXT) \ + lib_a-iscanf.$(OBJEXT) lib_a-memcpy.$(OBJEXT) \ + lib_a-memmove.$(OBJEXT) lib_a-memset.$(OBJEXT) \ + lib_a-mktemp.$(OBJEXT) lib_a-perror.$(OBJEXT) \ + lib_a-printf.$(OBJEXT) lib_a-putc.$(OBJEXT) \ + lib_a-putchar.$(OBJEXT) lib_a-puts.$(OBJEXT) \ + lib_a-remove.$(OBJEXT) lib_a-rename.$(OBJEXT) \ + lib_a-rewind.$(OBJEXT) lib_a-scanf.$(OBJEXT) \ + lib_a-setbuf.$(OBJEXT) lib_a-setvbuf.$(OBJEXT) \ + lib_a-siprintf.$(OBJEXT) lib_a-siscanf.$(OBJEXT) \ + lib_a-sleep.$(OBJEXT) lib_a-sniprintf.$(OBJEXT) \ + lib_a-snprintf.$(OBJEXT) lib_a-sprintf.$(OBJEXT) \ + lib_a-sscanf.$(OBJEXT) lib_a-stdio.$(OBJEXT) \ + lib_a-strcat.$(OBJEXT) lib_a-strchr.$(OBJEXT) \ + lib_a-strcmp.$(OBJEXT) lib_a-strcpy.$(OBJEXT) \ + lib_a-strcspn.$(OBJEXT) lib_a-strlen.$(OBJEXT) \ + lib_a-strncat.$(OBJEXT) lib_a-strncmp.$(OBJEXT) \ + lib_a-strncpy.$(OBJEXT) lib_a-strpbrk.$(OBJEXT) \ + lib_a-strrchr.$(OBJEXT) lib_a-strspn.$(OBJEXT) \ + lib_a-strxfrm.$(OBJEXT) lib_a-tmpfile.$(OBJEXT) \ + lib_a-tmpnam.$(OBJEXT) lib_a-ungetc.$(OBJEXT) \ + lib_a-usleep.$(OBJEXT) lib_a-vfiprintf.$(OBJEXT) \ + lib_a-vfiscanf.$(OBJEXT) lib_a-vfprintf.$(OBJEXT) \ + lib_a-vfscanf.$(OBJEXT) lib_a-viprintf.$(OBJEXT) \ + lib_a-viscanf.$(OBJEXT) lib_a-vprintf.$(OBJEXT) \ + lib_a-vscanf.$(OBJEXT) lib_a-vsiprintf.$(OBJEXT) \ + lib_a-vsiscanf.$(OBJEXT) lib_a-vsniprintf.$(OBJEXT) \ + lib_a-vsnprintf.$(OBJEXT) lib_a-vsprintf.$(OBJEXT) \ + lib_a-vsscanf.$(OBJEXT) lib_a_OBJECTS = $(am_lib_a_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) depcomp = @@ -260,7 +261,7 @@ AUTOMAKE_OPTIONS = cygnus INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) noinst_LIBRARIES = lib.a AM_CCASFLAGS = $(INCLUDES) -lib_a_SOURCES = setjmp.S clearerr.c fclose.c feof.c ferror.c fflush.c \ +lib_a_SOURCES = setjmp.S clearerr.c creat.c fclose.c feof.c ferror.c fflush.c \ fgetc.c fgetpos.c fgets.c fileno.c fiprintf.c fiscanf.c fopen.c \ fprintf.c fputc.c fputs.c fread.c freopen.c fscanf.c fseek.c \ fsetpos.c ftell.c fwrite.c getc.c getchar.c gets.c iprintf.c \ @@ -353,6 +354,12 @@ lib_a-clearerr.o: clearerr.c lib_a-clearerr.obj: clearerr.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-clearerr.obj `if test -f 'clearerr.c'; then $(CYGPATH_W) 'clearerr.c'; else $(CYGPATH_W) '$(srcdir)/clearerr.c'; fi` +lib_a-creat.o: creat.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-creat.o `test -f 'creat.c' || echo '$(srcdir)/'`creat.c + +lib_a-creat.obj: creat.c + $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-creat.obj `if test -f 'creat.c'; then $(CYGPATH_W) 'creat.c'; else $(CYGPATH_W) '$(srcdir)/creat.c'; fi` + lib_a-fclose.o: fclose.c $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-fclose.o `test -f 'fclose.c' || echo '$(srcdir)/'`fclose.c diff --git a/newlib/libc/machine/spu/creat.c b/newlib/libc/machine/spu/creat.c new file mode 100644 index 000000000..3cd714306 --- /dev/null +++ b/newlib/libc/machine/spu/creat.c @@ -0,0 +1,15 @@ +/* creat() "system call" */ + +/* copied from libc/posix/creat.c */ + +/* This is needed by f2c and therefore the SPEC benchmarks. */ + +#include <fcntl.h> + +int +_DEFUN(creat, (path, mode), + const char *path _AND + mode_t mode) +{ + return open (path, O_WRONLY | O_CREAT | O_TRUNC, mode); +} |