internal.h

Go to the documentation of this file.
00001 
00025 #ifndef _GAIM_INTERNAL_H_
00026 #define _GAIM_INTERNAL_H_
00027 
00028 #ifdef HAVE_CONFIG_H
00029 # include <config.h>
00030 #endif
00031 
00032 #ifdef ENABLE_NLS
00033 #  include <locale.h>
00034 #  include <libintl.h>
00035 #  define _(x) gettext(x)
00036 #  ifdef gettext_noop
00037 #    define N_(String) gettext_noop (String)
00038 #  else
00039 #    define N_(String) (String)
00040 #  endif
00041 #else
00042 #  include <locale.h>
00043 #  define N_(String) (String)
00044 #  define _(x) (x)
00045 #  define ngettext(Singular, Plural, Number) ((Number == 1) ? (Singular) : (Plural))
00046 #endif
00047 /*
00048  * The Singular/Plural/Number ngettext definition above was taken
00049  * from an email to the texinfo mailing list by Manuel Guerrero.
00050  * Thank you Manuel, and thank you Alex's good friend Google.
00051  */
00052 
00053 #ifdef HAVE_ENDIAN_H
00054 # include <endian.h>
00055 #endif
00056 
00057 #define MSG_LEN 2048
00058 /* The above should normally be the same as BUF_LEN,
00059  * but just so we're explicitly asking for the max message
00060  * length. */
00061 #define BUF_LEN MSG_LEN
00062 #define BUF_LONG BUF_LEN * 2
00063 
00064 #include <sys/stat.h>
00065 #include <sys/time.h>
00066 #include <sys/types.h>
00067 #ifndef _WIN32
00068 #include <sys/wait.h>
00069 #endif
00070 #include <ctype.h>
00071 #include <errno.h>
00072 #include <fcntl.h>
00073 #include <math.h>
00074 #include <stdio.h>
00075 #include <stdlib.h>
00076 #include <string.h>
00077 #include <time.h>
00078 
00079 #ifdef HAVE_ICONV
00080 #include <iconv.h>
00081 #endif
00082 
00083 #ifdef HAVE_LANGINFO_CODESET
00084 #include <langinfo.h>
00085 #endif
00086 
00087 #ifdef GAIM_PLUGINS
00088 # include <gmodule.h>
00089 # ifndef _WIN32
00090 #  include <dlfcn.h>
00091 # endif
00092 #endif
00093 
00094 #ifndef _WIN32
00095 # include <netinet/in.h>
00096 # include <sys/socket.h>
00097 # include <arpa/inet.h>
00098 # include <sys/un.h>
00099 # include <sys/utsname.h>
00100 # include <netdb.h>
00101 # include <signal.h>
00102 # include <unistd.h>
00103 #endif
00104 
00105 #ifndef MAXPATHLEN
00106 # define MAXPATHLEN 1024
00107 #endif
00108 
00109 #ifndef HOST_NAME_MAX
00110 # define HOST_NAME_MAX 255
00111 #endif
00112 
00113 #define PATHSIZE 1024
00114 
00115 #include <glib.h>
00116 #if GLIB_CHECK_VERSION(2,6,0)
00117 #   include <glib/gstdio.h>
00118 #endif
00119 
00120 #ifdef _WIN32
00121 #include "win32dep.h"
00122 #endif
00123 
00124 #if !GLIB_CHECK_VERSION(2,6,0)
00125 #   define g_freopen freopen
00126 #   define g_fopen fopen
00127 #   define g_rmdir rmdir
00128 #   define g_remove remove
00129 #   define g_unlink unlink
00130 #   define g_lstat lstat
00131 #   define g_stat stat
00132 #   define g_mkdir mkdir
00133 #   define g_rename rename
00134 #   define g_open open
00135 #endif
00136 
00137 /* ugly ugly ugly */
00138 /* This is a workaround for the fact that G_GINT64_MODIFIER and G_GSIZE_FORMAT
00139  * are only defined in Glib >= 2.4 */
00140 #ifndef G_GINT64_MODIFIER
00141 #   if GLIB_SIZEOF_LONG == 8
00142 #       define G_GINT64_MODIFIER "l"
00143 #   else
00144 #       define G_GINT64_MODIFIER "ll"
00145 #   endif
00146 #endif
00147 
00148 #ifndef G_GSIZE_FORMAT
00149 #   if GLIB_SIZEOF_LONG == 8
00150 #       define G_GSIZE_FORMAT "lu"
00151 #   else
00152 #       define G_GSIZE_FORMAT "u"
00153 #   endif
00154 #endif
00155 
00156 #define GAIM_WEBSITE "http://gaim.sourceforge.net/"
00157 
00158 #ifndef _WIN32
00159 /* Everything needs to include this, because
00160  * everything gets the autoconf macros */
00161 #include "prefix.h"
00162 #endif /* _WIN32 */
00163 
00164 #endif /* _GAIM_INTERNAL_H_ */

Generated on Wed Aug 9 23:40:23 2006 for gaim by  doxygen 1.4.7