diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index 83f50e37..e680c72e 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -318,6 +318,10 @@ get_xdir_fs (void) return xdir_fs; } +#elif FE_AQUA || FE_IOS + +extern char *get_xdir_fs(void); + #else char * @@ -566,6 +570,9 @@ const struct prefs vars[] = { {"url_grabber", P_OFFINT (url_grabber), TYPE_BOOL}, {"url_grabber_limit", P_OFFINT (url_grabber_limit), TYPE_INT}, +#ifdef FE_AQUA +# include "Sources/XAVars.h" +#endif {0, 0, 0}, }; @@ -686,6 +693,9 @@ load_config (void) prefs.url_grabber_limit = 0; /* 0 means unlimited for backcompat */ #ifdef WIN32 prefs.identd = 1; +#endif +#ifdef FE_AQUA +# include "Sources/XADefaults.h" #endif strcpy (prefs.stamp_format, "[%H:%M] "); strcpy (prefs.timestamp_log_format, "%b %d %H:%M:%S "); diff --git a/src/common/ctcp.c b/src/common/ctcp.c index 574cda79..1718b114 100644 --- a/src/common/ctcp.c +++ b/src/common/ctcp.c @@ -134,8 +134,13 @@ ctcp_handle (session *sess, char *to, char *nick, char *ip, if (!strcasecmp (msg, "VERSION") && !prefs.hidever) { +#ifdef FE_AQUA || FE_IOS + snprintf (outbuf, sizeof (outbuf), "VERSION X-Chat Aqua %s (xchat "PACKAGE_VERSION") %s", + MYVERSION, get_cpu_str ()); +#else snprintf (outbuf, sizeof (outbuf), "VERSION xchat "PACKAGE_VERSION" %s", get_cpu_str ()); +#endif serv->p_nctcp (serv, nick, outbuf); } diff --git a/src/common/plugin.c b/src/common/plugin.c index ada4d3be..2146ec3b 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -439,6 +439,10 @@ plugin_auto_load (session *sess) #if defined(__hpux) for_files (XCHATLIBDIR"/plugins", "*.sl", plugin_auto_load_cb); for_files (get_xdir_fs (), "*.sl", plugin_auto_load_cb); +#elif defined(FE_AQUA) || defined(FE_IOS) + //TODO: hide plugins into app bundle + for_files ("./plugins", "*.so", plugin_auto_load_cb); // X-Chat Aqua + for_files (get_xdir_fs (), "*.so", plugin_auto_load_cb); #else for_files (XCHATLIBDIR"/plugins", "*.so", plugin_auto_load_cb); for_files (get_xdir_fs (), "*.so", plugin_auto_load_cb); diff --git a/src/common/server.c b/src/common/server.c index db0af9ca..ab148209 100644 --- a/src/common/server.c +++ b/src/common/server.c @@ -1680,6 +1680,9 @@ server_connect (server *serv, char *hostname, int port, int no_login) { int pid, read_des[2]; session *sess = serv->server_session; +#ifdef FORK_DISABLED + pthread_t *t; +#endif #ifdef USE_OPENSSL if (!ctx && serv->use_ssl) @@ -1774,10 +1777,14 @@ server_connect (server *serv, char *hostname, int port, int no_login) serv->proxy_sok6 = -1; } -#ifdef WIN32 +#if defined(WIN32) CloseHandle (CreateThread (NULL, 0, (LPTHREAD_START_ROUTINE)server_child, serv, 0, (DWORD *)&pid)); +#elif defined (FORK_DISABLED) + t = malloc(sizeof(pthread_t)); + pthread_create(t, NULL, &server_child, serv); + pid = t; #else #ifdef LOOKUPD rand(); /* CL: net_resolve calls rand() when LOOKUPD is set, so prepare a different seed for each child. This method giver a bigger variation in seed values than calling srand(time(0)) in the child itself. */ diff --git a/src/common/text.c b/src/common/text.c index 6b111742..700b1791 100644 --- a/src/common/text.c +++ b/src/common/text.c @@ -2163,6 +2163,9 @@ sound_find_command (void) void sound_play (const char *file, gboolean quiet) { +#ifdef FE_AQUA || FE_IOS + fe_play_wave (file); +#else char buf[512]; char wavfile[512]; char *file_fs; @@ -2228,6 +2231,7 @@ sound_play (const char *file, gboolean quiet) } g_free (file_fs); +#endif /* FE_AQUA */ } void diff --git a/src/common/xchat.c b/src/common/xchat.c index afac9a0e..f41eb215 100644 --- a/src/common/xchat.c +++ b/src/common/xchat.c @@ -808,9 +808,11 @@ xchat_init (void) servlist_init (); /* load server list */ + #ifndef FE_IOS /* if we got a URL, don't open the server list GUI */ if (!prefs.slist_skip && !arg_url) fe_serverlist_open (NULL); + #endif /* turned OFF via -a arg */ if (!arg_dont_autoconnect) diff --git a/src/common/xchat.h b/src/common/xchat.h index 3a5af0eb..cc235993 100644 --- a/src/common/xchat.h +++ b/src/common/xchat.h @@ -306,6 +306,10 @@ struct xchatprefs This is so that we continue using internal defaults (which can change in the next release) until the user edits them. */ unsigned int save_pevents:1; + /* XCA specific preferences: */ +#ifdef FE_AQUA +# include "Sources/XAPrefs.h" +#endif }; /* Session types */