1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2
/* camel-win32.c : Win32-specific bits */
5
* Authors: Tor Lillqvist <tml@novell.com>
7
* Copyright 2005 Novell, Inc. (www.novell.com)
9
* This program is free software; you can redistribute it and/or
10
* modify it under the terms of version 2 of the GNU Lesser General Public
11
* License as published by the Free Software Foundation.
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU Lesser General Public License for more details.
18
* You should have received a copy of the GNU Lesser General Public License
19
* along with this program; if not, write to the Free Software
20
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
32
#include <glib/gstdio.h>
34
#include <libedataserver/e-data-server-util.h>
38
G_LOCK_DEFINE_STATIC (mutex);
40
/* localedir uses system codepage as it is passed to the non-UTF8ified
43
static const char *localedir = NULL;
45
/* The others are in UTF-8 */
46
static const char *libexecdir;
47
static const char *providerdir;
53
if (localedir != NULL) {
58
localedir = e_util_replace_prefix (E_DATA_SERVER_PREFIX, e_util_get_cp_prefix (), LOCALEDIR);
60
libexecdir = e_util_replace_prefix (E_DATA_SERVER_PREFIX, e_util_get_prefix (), CAMEL_LIBEXECDIR);
61
providerdir = e_util_replace_prefix (E_DATA_SERVER_PREFIX, e_util_get_prefix (), CAMEL_PROVIDERDIR);
66
#include "camel-private.h" /* For prototypes */
68
#define GETTER(varbl) \
70
_camel_get_##varbl (void) \
86
handle = _get_osfhandle (fd);
92
/* FlushFileBuffers() fails if called on a handle to the
93
* console output. As we cannot know whether fd refers to the
94
* console output or not, punt, and call FlushFileBuffers()
95
* only for regular files and pipes.
97
if (!(S_ISREG (st.st_mode) || S_ISFIFO (st.st_mode)))
100
if (FlushFileBuffers ((HANDLE) handle))