Commit 3b348f74 authored by Manish Singh's avatar Manish Singh

correct checking for BeOS check

* configure.in: correct checking for BeOS check

* gdk/gdktypes.h
* gtk/fnmatch.c
* gtk/gtkfilesel.c
* gtk/gtkitemfactory.c
* gtk/gtkmain.[ch]
* gtk/gtkrc.c: use G_OS_WIN32 and G_HAVE_CYGWIN #defines

-Yosh
parent 0fef3d2f
Mon Oct 4 11:57:11 PDT 1999 Manish Singh <yosh@gimp.org>
* configure.in: correct checking for BeOS check
* gdk/gdktypes.h
* gtk/fnmatch.c
* gtk/gtkfilesel.c
* gtk/gtkitemfactory.c
* gtk/gtkmain.[ch]
* gtk/gtkrc.c: use G_OS_WIN32 and G_HAVE_CYGWIN #defines
Mon Oct 4 16:16:53 1999 Pablo Saratxaga <pablo@mandrakesoft.com>
* gtk/gtkrc.{bg,iso88591[345]}: add gtkrc files for some new charset
......
Mon Oct 4 11:57:11 PDT 1999 Manish Singh <yosh@gimp.org>
* configure.in: correct checking for BeOS check
* gdk/gdktypes.h
* gtk/fnmatch.c
* gtk/gtkfilesel.c
* gtk/gtkitemfactory.c
* gtk/gtkmain.[ch]
* gtk/gtkrc.c: use G_OS_WIN32 and G_HAVE_CYGWIN #defines
Mon Oct 4 16:16:53 1999 Pablo Saratxaga <pablo@mandrakesoft.com>
* gtk/gtkrc.{bg,iso88591[345]}: add gtkrc files for some new charset
......
Mon Oct 4 11:57:11 PDT 1999 Manish Singh <yosh@gimp.org>
* configure.in: correct checking for BeOS check
* gdk/gdktypes.h
* gtk/fnmatch.c
* gtk/gtkfilesel.c
* gtk/gtkitemfactory.c
* gtk/gtkmain.[ch]
* gtk/gtkrc.c: use G_OS_WIN32 and G_HAVE_CYGWIN #defines
Mon Oct 4 16:16:53 1999 Pablo Saratxaga <pablo@mandrakesoft.com>
* gtk/gtkrc.{bg,iso88591[345]}: add gtkrc files for some new charset
......
Mon Oct 4 11:57:11 PDT 1999 Manish Singh <yosh@gimp.org>
* configure.in: correct checking for BeOS check
* gdk/gdktypes.h
* gtk/fnmatch.c
* gtk/gtkfilesel.c
* gtk/gtkitemfactory.c
* gtk/gtkmain.[ch]
* gtk/gtkrc.c: use G_OS_WIN32 and G_HAVE_CYGWIN #defines
Mon Oct 4 16:16:53 1999 Pablo Saratxaga <pablo@mandrakesoft.com>
* gtk/gtkrc.{bg,iso88591[345]}: add gtkrc files for some new charset
......
Mon Oct 4 11:57:11 PDT 1999 Manish Singh <yosh@gimp.org>
* configure.in: correct checking for BeOS check
* gdk/gdktypes.h
* gtk/fnmatch.c
* gtk/gtkfilesel.c
* gtk/gtkitemfactory.c
* gtk/gtkmain.[ch]
* gtk/gtkrc.c: use G_OS_WIN32 and G_HAVE_CYGWIN #defines
Mon Oct 4 16:16:53 1999 Pablo Saratxaga <pablo@mandrakesoft.com>
* gtk/gtkrc.{bg,iso88591[345]}: add gtkrc files for some new charset
......
Mon Oct 4 11:57:11 PDT 1999 Manish Singh <yosh@gimp.org>
* configure.in: correct checking for BeOS check
* gdk/gdktypes.h
* gtk/fnmatch.c
* gtk/gtkfilesel.c
* gtk/gtkitemfactory.c
* gtk/gtkmain.[ch]
* gtk/gtkrc.c: use G_OS_WIN32 and G_HAVE_CYGWIN #defines
Mon Oct 4 16:16:53 1999 Pablo Saratxaga <pablo@mandrakesoft.com>
* gtk/gtkrc.{bg,iso88591[345]}: add gtkrc files for some new charset
......
Mon Oct 4 11:57:11 PDT 1999 Manish Singh <yosh@gimp.org>
* configure.in: correct checking for BeOS check
* gdk/gdktypes.h
* gtk/fnmatch.c
* gtk/gtkfilesel.c
* gtk/gtkitemfactory.c
* gtk/gtkmain.[ch]
* gtk/gtkrc.c: use G_OS_WIN32 and G_HAVE_CYGWIN #defines
Mon Oct 4 16:16:53 1999 Pablo Saratxaga <pablo@mandrakesoft.com>
* gtk/gtkrc.{bg,iso88591[345]}: add gtkrc files for some new charset
......
......@@ -217,10 +217,12 @@ GTK_LIBS_EXTRA=
AC_MSG_CHECKING(for the BeOS)
case $host in
*-*-beos*)
AC_MSG_RESULT(yes)
GTK_LIBS_EXTRA="-L\$(top_builddir_full)/gdk/.libs -lgdk"
MATH_LIB=
;;
default)
*)
AC_MSG_RESULT(no)
;;
esac
AC_SUBST(MATH_LIB)
......
......@@ -31,7 +31,7 @@
*/
#include <glib.h>
#ifdef NATIVE_WIN32
#ifdef G_OS_WIN32
# ifdef GDK_COMPILATION
# define GDKVAR __declspec(dllexport)
# else
......
......@@ -36,7 +36,7 @@
#endif
#include "fnmatch.h"
/* We need glib.h for G_DIR_SEPARATOR, WIN32 and NATIVE_WIN32 */
/* We need glib.h for G_DIR_SEPARATOR and G_OS_WIN32 */
#include <glib.h>
#include <ctype.h>
......@@ -67,7 +67,7 @@ fnmatch (pattern, string, flags)
register char c;
/* Note that this evalutes C many times. */
#ifndef WIN32
#if !defined(G_OS_WIN32) && !defined(G_HAVE_CYGWIN)
#define FOLD(c) ((flags & FNM_CASEFOLD) && isupper (c) ? tolower (c) : (c))
#else
#define FOLD(c) (tolower (c))
......@@ -88,7 +88,7 @@ fnmatch (pattern, string, flags)
(n == string || ((flags & FNM_FILE_NAME) && n[-1] == G_DIR_SEPARATOR)))
return FNM_NOMATCH;
break;
#ifndef NATIVE_WIN32
#ifndef G_OS_WIN32
case '\\':
if (!(flags & FNM_NOESCAPE))
{
......@@ -113,7 +113,7 @@ fnmatch (pattern, string, flags)
return 0;
{
#ifndef NATIVE_WIN32
#ifndef G_OS_WIN32
char c1 = (!(flags & FNM_NOESCAPE) && c == '\\') ? *p : c;
#else
char c1 = c;
......@@ -146,7 +146,7 @@ fnmatch (pattern, string, flags)
for (;;)
{
register char cstart = c, cend = c;
#ifndef NATIVE_WIN32
#ifndef G_OS_WIN32
if (!(flags & FNM_NOESCAPE) && c == '\\')
cstart = cend = *p++;
#endif
......@@ -166,7 +166,7 @@ fnmatch (pattern, string, flags)
if (c == '-' && *p != ']')
{
cend = *p++;
#ifndef NATIVE_WIN32
#ifndef G_OS_WIN32
if (!(flags & FNM_NOESCAPE) && cend == '\\')
cend = *p++;
#endif
......@@ -196,7 +196,7 @@ fnmatch (pattern, string, flags)
return FNM_NOMATCH;
c = *p++;
#ifndef NATIVE_WIN32
#ifndef G_OS_WIN32
if (!(flags & FNM_NOESCAPE) && c == '\\')
/* XXX 1003.2d11 is unclear if this is right. */
++p;
......
......@@ -71,11 +71,11 @@
#include "gtkdialog.h"
#include "gtkintl.h"
#ifdef WIN32
#if defined(G_OS_WIN32) || defined(G_HAVE_CYGWIN)
#define STRICT
#include <windows.h>
#ifdef NATIVE_WIN32
#ifdef G_OS_WIN32
#include <direct.h>
#include <io.h>
#define mkdir(p,m) _mkdir(p)
......@@ -83,9 +83,9 @@
#define S_ISDIR(mode) ((mode)&_S_IFDIR)
#endif
#endif /* NATIVE_WIN32 */
#endif /* G_OS_WIN32 */
#endif /* WIN32 */
#endif /* G_OS_WIN32 || G_HAVE_CYGWIN */
#define DIR_LIST_WIDTH 180
#define DIR_LIST_HEIGHT 180
......@@ -284,7 +284,7 @@ static gchar* cmpl_completion_fullname (gchar*, CompletionState* cm
static CompletionDir* open_ref_dir (gchar* text_to_complete,
gchar** remaining_text,
CompletionState* cmpl_state);
#ifndef WIN32
#if !defined(G_OS_WIN32) && !defined(G_HAVE_CYGWIN)
static gboolean check_dir (gchar *dir_name,
struct stat *result,
gboolean *stat_subdirs);
......@@ -367,7 +367,7 @@ static GtkWindowClass *parent_class = NULL;
/* Saves errno when something cmpl does fails. */
static gint cmpl_errno;
#ifdef __CYGWIN32__
#ifdef G_HAVE_CYGWIN
/*
* Take the path currently in the file selection
* entry field and translate as necessary from
......@@ -743,7 +743,7 @@ gtk_file_selection_get_filename (GtkFileSelection *filesel)
g_return_val_if_fail (filesel != NULL, nothing);
g_return_val_if_fail (GTK_IS_FILE_SELECTION (filesel), nothing);
#ifdef __CYGWIN32__
#ifdef G_HAVE_CYGWIN
translate_win32_path(filesel);
#endif
text = gtk_entry_get_text (GTK_ENTRY (filesel->selection_entry));
......@@ -1011,7 +1011,7 @@ gtk_file_selection_delete_file (GtkWidget *widget, gpointer data)
if (fs->fileop_dialog)
return;
#ifdef __CYGWIN32__
#ifdef G_HAVE_CYGWIN
translate_win32_path(fs);
#endif
......@@ -1200,7 +1200,7 @@ gtk_file_selection_key_press (GtkWidget *widget,
if (event->keyval == GDK_Tab)
{
fs = GTK_FILE_SELECTION (user_data);
#ifdef __CYGWIN32__
#ifdef G_HAVE_CYGWIN
translate_win32_path(fs);
#endif
text = gtk_entry_get_text (GTK_ENTRY (fs->selection_entry));
......@@ -1291,7 +1291,7 @@ gtk_file_selection_update_history_menu (GtkFileSelection *fs,
/* another small hack to catch the full path */
if (i != dir_len)
current_dir[i + 1] = '\0';
#ifdef __CYGWIN32__
#ifdef G_HAVE_CYGWIN
if (!strcmp(current_dir, "//"))
continue;
#endif
......@@ -1343,7 +1343,7 @@ gtk_file_selection_file_button (GtkWidget *widget,
gtk_clist_get_text (GTK_CLIST (fs->file_list), row, 0, &temp);
filename = g_strdup (temp);
#ifdef __CYGWIN32__
#ifdef G_HAVE_CYGWIN
/* Check to see if the selection was a drive selector */
if (isalpha(filename[0]) && (filename[1] == ':')) {
/* It is... map it to a CYGWIN32 drive */
......@@ -1353,7 +1353,7 @@ gtk_file_selection_file_button (GtkWidget *widget,
g_free(filename);
filename = g_strdup(temp_filename);
}
#endif /* CYGWIN32 */
#endif /* G_HAVE_CYGWIN */
if (filename)
{
......@@ -1414,7 +1414,7 @@ gtk_file_selection_dir_button (GtkWidget *widget,
}
}
#ifdef WIN32
#if defined(G_OS_WIN32) || defined(G_HAVE_CYGWIN)
static void
win32_gtk_add_drives_to_dir_list(GtkWidget *the_dir_list)
......@@ -1554,7 +1554,7 @@ gtk_file_selection_populate (GtkFileSelection *fs,
poss = cmpl_next_completion (cmpl_state);
}
#ifdef WIN32
#if defined(G_OS_WIN32) || defined(G_HAVE_CYGWIN)
/* For Windows, add drives as potential selections */
win32_gtk_add_drives_to_dir_list (fs->dir_list);
#endif
......@@ -1977,7 +1977,7 @@ open_ref_dir(gchar* text_to_complete,
first_slash = strchr(text_to_complete, G_DIR_SEPARATOR);
#ifdef __CYGWIN32__
#ifdef G_HAVE_CYGWIN
if (text_to_complete[0] == '/' && text_to_complete[1] == '/')
{
char root_dir[5];
......@@ -2230,7 +2230,7 @@ open_new_dir(gchar* dir_name, struct stat* sbuf, gboolean stat_subdirs)
return sent;
}
#ifndef WIN32
#if !defined(G_OS_WIN32) && !defined(G_HAVE_CYGWIN)
static gboolean
check_dir(gchar *dir_name, struct stat *result, gboolean *stat_subdirs)
......@@ -2296,7 +2296,7 @@ open_dir(gchar* dir_name, CompletionState* cmpl_state)
CompletionDirSent *sent;
GList* cdsl;
#ifndef WIN32
#if !defined(G_OS_WIN32) && !defined(G_HAVE_CYGWIN)
if (!check_dir (dir_name, &sbuf, &stat_subdirs))
return NULL;
......@@ -2465,7 +2465,7 @@ correct_parent(CompletionDir* cmpl_dir, struct stat *sbuf)
return FALSE;
}
#ifndef NATIVE_WIN32 /* No inode numbers on Win32 */
#ifndef G_OS_WIN32 /* No inode numbers on Win32 */
if (parbuf.st_ino == sbuf->st_ino && parbuf.st_dev == sbuf->st_dev)
/* it wasn't a link */
return TRUE;
......@@ -2490,7 +2490,7 @@ correct_parent(CompletionDir* cmpl_dir, struct stat *sbuf)
return TRUE;
}
#ifndef NATIVE_WIN32
#ifndef G_OS_WIN32
static gchar*
find_parent_dir_fullname(gchar* dirname)
......@@ -2586,7 +2586,7 @@ attempt_homedir_completion(gchar* text_to_complete,
#endif
#ifdef WIN32
#ifdef defined(G_OS_WIN32) || defined(G_HAVE_CYGWIN)
#define FOLD(c) (tolower(c))
#else
#define FOLD(c) (c)
......@@ -2960,7 +2960,7 @@ compare_user_dir(const void* a, const void* b)
static gint
compare_cmpl_dir(const void* a, const void* b)
{
#ifndef WIN32
#if !defined(G_OS_WIN32) && !defined(G_HAVE_CYGWIN)
return strcmp((((CompletionDirEntry*)a))->entry_name,
(((CompletionDirEntry*)b))->entry_name);
#else
......
......@@ -48,7 +48,7 @@
#endif
#include <stdio.h>
#ifdef NATIVE_WIN32
#ifdef G_OS_WIN32
#include <io.h> /* For _open and _close */
#ifndef S_ISREG
......
......@@ -401,7 +401,7 @@ gtk_init_check (int *argc,
}
#ifdef ENABLE_NLS
#ifndef NATIVE_WIN32
#ifndef G_OS_WIN32
bindtextdomain("gtk+", GTK_LOCALEDIR);
#else
{
......@@ -450,7 +450,7 @@ gtk_init_check (int *argc,
}
g_slist_free (gtk_modules);
#ifndef NATIVE_WIN32
#ifndef G_OS_WIN32
/* No use warning on Win32, there aren't any non-devel versions anyhow... */
g_warning ("" "YOU ARE USING THE DEVEL BRANCH 1.3.x OF GTK+ WHICH IS CURRENTLY\n"
" UNDER HEAVY DEVELOPMENT AND FREQUENTLY INTRODUCES INSTABILITIES.\n"
......
......@@ -56,7 +56,7 @@ typedef gint (*GtkKeySnoopFunc) (GtkWidget *grab_widget,
/* Gtk version.
*/
#ifdef NATIVE_WIN32
#ifdef G_OS_WIN32
#ifdef GTK_COMPILATION
#define GTKMAIN_C_VAR __declspec(dllexport)
#else
......
......@@ -50,7 +50,7 @@
#define lstat stat
#endif
#ifdef NATIVE_WIN32
#ifdef G_OS_WIN32
#include <io.h>
#endif
......@@ -230,10 +230,10 @@ static GtkImageLoader image_loader = NULL;
/* RC file handling */
#ifdef NATIVE_WIN32
#ifdef G_OS_WIN32
gchar *
get_gtk_sysconf_directory ()
get_gtk_sysconf_directory (void)
{
static gchar gtk_sysconf_dir[200];
gchar win_dir[100];
......@@ -244,7 +244,7 @@ get_gtk_sysconf_directory ()
}
static gchar *
get_themes_directory ()
get_themes_directory (void)
{
/* We really should fetch this from the Registry. The GIMP
* installation program stores the Themes installation
......@@ -264,7 +264,7 @@ gtk_rc_get_theme_dir(void)
{
gchar *var, *path;
#ifndef NATIVE_WIN32
#ifndef G_OS_WIN32
var = getenv("GTK_DATA_PREFIX");
if (var)
path = g_strdup_printf("%s%s", var, "/share/themes");
......@@ -282,7 +282,7 @@ gtk_rc_get_module_dir(void)
{
gchar *var, *path;
#ifndef NATIVE_WIN32
#ifndef G_OS_WIN32
var = getenv("GTK_EXE_PREFIX");
if (var)
path = g_strdup_printf("%s%s", var, "/lib/gtk/themes/engines");
......@@ -301,7 +301,7 @@ gtk_rc_append_default_pixmap_path(void)
gchar *var, *path;
gint n;
#ifndef NATIVE_WIN32
#ifndef G_OS_WIN32
var = getenv("GTK_DATA_PREFIX");
if (var)
path = g_strdup_printf("%s%s", var, "/share/gtk/themes");
......@@ -343,7 +343,7 @@ gtk_rc_append_default_module_path(void)
if (n >= GTK_RC_MAX_MODULE_PATHS - 1)
return;
#ifndef NATIVE_WIN32
#ifndef G_OS_WIN32
var = getenv("GTK_EXE_PREFIX");
if (var)
path = g_strdup_printf("%s%s", var, "/lib/gtk/themes/engines");
......@@ -357,7 +357,7 @@ gtk_rc_append_default_module_path(void)
var = g_get_home_dir ();
if (var)
{
#ifndef NATIVE_WIN32
#ifndef G_OS_WIN32
path = g_strdup_printf ("%s%s", var, "/.gtk/lib/themes/engines");
#else
path = g_strdup_printf ("%s%s", var, "\\_gtk\\themes\\engines");
......@@ -395,7 +395,7 @@ gtk_rc_add_initial_default_files (void)
}
else
{
#ifndef NATIVE_WIN32
#ifndef G_OS_WIN32
str = g_strdup (GTK_SYSCONFDIR G_DIR_SEPARATOR_S "gtk" G_DIR_SEPARATOR_S "gtkrc");
#else
str = g_strdup_printf ("%s\\gtkrc", get_gtk_sysconf_directory ());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment