+2005-12-09 Tor Lillqvist <tml@novell.com>
+
+ * camel-mbox-folder.c: Just #define O_BINARY as 0 on Unix, less
+ ifdefs that way. Should really do this in some suitable header, of
+ course, and not duplicate here and there.
+
2005-12-09 David Malcolm <dmalcolm@redhat.com>
* camel-local-folder.c: restore missing declarations for non-Win32
#include "camel-mbox-store.h"
#include "camel-mbox-summary.h"
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
#define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
static CamelLocalFolderClass *parent_class = NULL;
char *fromline = NULL;
int fd, retval;
struct stat st;
- int mode;
#if 0
char *xev;
#endif
g_free(fromline);
/* reset the file to original size */
-#ifdef G_OS_WIN32
- mode = O_WRONLY | O_BINARY;
-#else
- mode = O_WRONLY;
-#endif
- fd = g_open(lf->folder_path, mode, 0600);
+ fd = g_open(lf->folder_path, O_WRONLY | O_BINARY, 0600);
if (fd != -1) {
ftruncate(fd, mbs->folder_size);
close(fd);
int fd, retval;
int retried = FALSE;
off_t frompos;
- int mode;
d(printf("Getting message %s\n", uid));
with no stream). This means we dont have to lock the mbox for the life of the message, but only
while it is being created. */
-#ifdef G_OS_WIN32
- mode = O_RDONLY | O_BINARY;
-#else
- mode = O_RDONLY;
-#endif
-
- fd = g_open(lf->folder_path, mode, 0);
+ fd = g_open(lf->folder_path, O_RDONLY | O_BINARY, 0);
if (fd == -1) {
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
_("Cannot get message: %s from folder %s\n %s"),