Restored work-around for hangs when trying to use disk-based handlers
[tangerine.git] / compiler / clib / creat.c
blob0c2c2bc60e6a76d9b6aedf142ada5eb35511ff15
1 /*
2 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
3 $Id$
5 ANSI C function creat().
6 */
8 /*****************************************************************************
10 NAME */
11 #include <unistd.h>
12 #include <fcntl.h>
14 int creat (
16 /* SYNOPSIS */
17 const char * pathname,
18 int mode)
20 /* FUNCTION
21 Creates a file with the specified mode and name.
23 INPUTS
24 pathname - Path and filename of the file you want to open.
25 mode - The access flags.
27 RESULT
28 -1 for error or a file descriptor for use with write().
30 NOTES
31 If the filesystem doesn't allow to specify different access modes
32 for users, groups and others, then the user modes are used.
34 This is the same as open (pathname, O_CREAT|O_WRONLY|O_TRUNC, mode);
36 This function must not be used in a shared library or
37 in a threaded application.
39 EXAMPLE
41 BUGS
43 SEE ALSO
44 open(), close(), write(), fopen()
46 INTERNALS
48 ******************************************************************************/
50 return open (pathname, O_CREAT|O_WRONLY|O_TRUNC, mode);
51 } /* creat */