summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/creat.c
blob: 46fd4b5b6059a9569e4c113b1b5651a3ebe6b59d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
 *  $Id$
 */

/* creat() "system call" */

#if HAVE_CONFIG_H
#include "config.h"
#endif

#ifndef HAVE_CREAT
/* This is needed by f2c and therefore the SPEC benchmarks.  */

#include <fcntl.h>

int
creat (const char *path, mode_t mode)
{
  return open (path, O_WRONLY | O_CREAT | O_TRUNC, mode);
}
#endif