1 /* $Id: xfopena.c 5381 2002-03-31 22:35:47Z rra $
12 ** Open a file in append mode. Since not all fopen's set the O_APPEND
13 ** flag, we do it by hand.
15 FILE *xfopena(const char *p)
19 /* We can't trust stdio to really use O_APPEND, so open, then fdopen. */
20 fd = open(p, O_WRONLY | O_APPEND | O_CREAT, 0666);
21 return fd >= 0 ? fdopen(fd, "a") : NULL;