projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add include files to get prototype declarations, and fix bugs found.
[unix-history]
/
usr
/
src
/
lib
/
libc
/
compat-43
/
creat.c
diff --git
a/usr/src/lib/libc/compat-43/creat.c
b/usr/src/lib/libc/compat-43/creat.c
index
823636f
..
800c6ad
100644
(file)
--- a/
usr/src/lib/libc/compat-43/creat.c
+++ b/
usr/src/lib/libc/compat-43/creat.c
@@
-6,15
+6,18
@@
*/
#if defined(LIBC_SCCS) && !defined(lint)
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)creat.c 5.
2
(Berkeley) %G%";
+static char sccsid[] = "@(#)creat.c 5.
3
(Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
#endif /* LIBC_SCCS and not lint */
-#include <sys/types.h>
-#include <sys/file.h>
+#include <fcntl.h>
+#if __STDC__
+creat(const char *path, mode_t mode)
+#else
creat(path, mode)
char *path;
mode_t mode;
creat(path, mode)
char *path;
mode_t mode;
+#endif
{
return(open(path, O_WRONLY|O_CREAT|O_TRUNC, mode));
}
{
return(open(path, O_WRONLY|O_CREAT|O_TRUNC, mode));
}