creat.c 386 B

1234567891011121314151617
  1. /*
  2. * creat() for uClibc
  3. *
  4. * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  5. *
  6. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  7. */
  8. #include <fcntl.h>
  9. #include <cancel.h>
  10. int creat(const char *file, mode_t mode)
  11. {
  12. return open(file, O_WRONLY | O_CREAT | O_TRUNC, mode);
  13. }
  14. /* open handled cancellation, noop on uClibc */
  15. LIBC_CANCEL_HANDLED();