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 9 #include <fcntl.h> 10 #include <cancel.h> 11 creat(const char * file,mode_t mode)12int creat(const char *file, mode_t mode) 13 { 14 return open(file, O_WRONLY | O_CREAT | O_TRUNC, mode); 15 } 16 /* open handled cancellation, noop on uClibc */ 17 LIBC_CANCEL_HANDLED(); 18