Don't initialize globals to zero (or NULL)

Some compilers and linkers aren't smart enough to optimize this,
as global variables are implictly initialized to zero.  As a
result, binaries are a bit smaller as more goes in the .bss and
less in the text section.

git-svn-id: https://svn.musicpd.org/mpd/trunk@5254 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Eric Wong 2007-01-14 03:07:53 +00:00
parent 45716f877b
commit b443363aa6
34 changed files with 88 additions and 206 deletions

View File

@ -39,12 +39,12 @@
#define AUDIO_DEVICE_STATE_LEN 19 /* strlen(AUDIO_DEVICE_STATE) */ #define AUDIO_DEVICE_STATE_LEN 19 /* strlen(AUDIO_DEVICE_STATE) */
#define AUDIO_BUFFER_SIZE 2*MAXPATHLEN #define AUDIO_BUFFER_SIZE 2*MAXPATHLEN
static AudioFormat audio_format = { 0, 0, 0 }; static AudioFormat audio_format;
static AudioFormat *audio_configFormat = NULL; static AudioFormat *audio_configFormat;
static AudioOutput *audioOutputArray = NULL; static AudioOutput *audioOutputArray;
static mpd_uint8 audioOutputArraySize = 0; static mpd_uint8 audioOutputArraySize;
#define DEVICE_OFF 0x00 #define DEVICE_OFF 0x00
#define DEVICE_ENABLE 0x01 /* currently off, but to be turned on */ #define DEVICE_ENABLE 0x01 /* currently off, but to be turned on */
@ -53,13 +53,13 @@ static mpd_uint8 audioOutputArraySize = 0;
/* the audioEnabledArray should be stuck into shared memory, and then disable /* the audioEnabledArray should be stuck into shared memory, and then disable
and enable in playAudio() routine */ and enable in playAudio() routine */
static mpd_uint8 *audioDeviceStates = NULL; static mpd_uint8 *audioDeviceStates;
static mpd_uint8 audioOpened = 0; static mpd_uint8 audioOpened;
static mpd_sint32 audioBufferSize = 0; static mpd_sint32 audioBufferSize;
static char *audioBuffer = NULL; static char *audioBuffer;
static mpd_sint32 audioBufferPos = 0; static mpd_sint32 audioBufferPos;
size_t audio_device_count(void) size_t audio_device_count(void)
{ {

View File

@ -27,18 +27,7 @@
#include "conf.h" #include "conf.h"
#include "utils.h" #include "utils.h"
#define DISABLED_AUDIO_OUTPUT_PLUGIN(plugin) \ #define DISABLED_AUDIO_OUTPUT_PLUGIN(plugin) AudioOutputPlugin plugin;
AudioOutputPlugin plugin = { \
NULL, \
NULL, \
NULL, \
NULL, \
NULL, \
NULL, \
NULL, \
NULL, \
NULL \
};
typedef struct _AudioOutput AudioOutput; typedef struct _AudioOutput AudioOutput;

View File

@ -27,7 +27,7 @@
#include <ao/ao.h> #include <ao/ao.h>
static int driverInitCount = 0; static int driverInitCount;
typedef struct _AoData { typedef struct _AoData {
int writeSize; int writeSize;

View File

@ -34,7 +34,7 @@
#define CONN_ATTEMPT_INTERVAL 60 #define CONN_ATTEMPT_INTERVAL 60
static int shoutInitCount = 0; static int shoutInitCount;
/* lots of this code blatantly stolent from bossogg/bossao2 */ /* lots of this code blatantly stolent from bossogg/bossao2 */

View File

@ -134,8 +134,8 @@ struct _CommandEntry {
CommandListHandlerFunction listHandler; CommandListHandlerFunction listHandler;
}; };
static char *current_command = NULL; static char *current_command;
static int command_listNum = 0; static int command_listNum;
static CommandEntry *getCommandEntryFromString(char *string, int *permission); static CommandEntry *getCommandEntryFromString(char *string, int *permission);
@ -516,7 +516,7 @@ static int listHandleUpdate(int fd,
char *argv[], char *argv[],
struct strnode *cmdnode, CommandEntry * cmd) struct strnode *cmdnode, CommandEntry * cmd)
{ {
static List *pathList = NULL; static List *pathList;
CommandEntry *nextCmd = NULL; CommandEntry *nextCmd = NULL;
struct strnode *next = cmdnode->next; struct strnode *next = cmdnode->next;

View File

@ -39,7 +39,7 @@ static int screen;
static GC blackGC, whiteGC, blueGC, yellowGC, dkyellowGC, redGC; static GC blackGC, whiteGC, blueGC, yellowGC, dkyellowGC, redGC;
#endif #endif
static int *peaks = NULL; static int *peaks;
static int gainCurrent, gainTarget; static int gainCurrent, gainTarget;
static struct { static struct {
@ -52,13 +52,13 @@ static struct {
} prefs; } prefs;
#ifdef USE_X #ifdef USE_X
static int mon_init = 0; static int mon_init;
#endif #endif
void CompressCfg(int show_mon, int anticlip, int target, int gainmax, void CompressCfg(int show_mon, int anticlip, int target, int gainmax,
int gainsmooth, int buckets) int gainsmooth, int buckets)
{ {
static int lastsize = 0; static int lastsize;
prefs.show_mon = show_mon; prefs.show_mon = show_mon;
prefs.anticlip = anticlip; prefs.anticlip = anticlip;
@ -179,9 +179,9 @@ void CompressDo(void *data, unsigned int length)
int gr, gf, gn; int gr, gf, gn;
static int pn = -1; static int pn = -1;
#ifdef STATS #ifdef STATS
static int clip = 0; static int clip;
#endif #endif
static int clipped = 0; static int clipped;
if (!peaks) if (!peaks)
return; return;

View File

@ -48,7 +48,7 @@ typedef struct _configEntry {
List *configParamList; List *configParamList;
} ConfigEntry; } ConfigEntry;
static List *configEntriesList = NULL; static List *configEntriesList;
static ConfigParam *newConfigParam(char *value, int line) static ConfigParam *newConfigParam(char *value, int line)
{ {

View File

@ -37,7 +37,7 @@
#include <unistd.h> #include <unistd.h>
#include <string.h> #include <string.h>
static int decode_pid = 0; static int decode_pid;
void decodeSigHandler(int sig, siginfo_t * si, void *v) void decodeSigHandler(int sig, siginfo_t * si, void *v)
{ {

View File

@ -59,15 +59,15 @@
#define DIRECTORY_RETURN_UPDATE 1 #define DIRECTORY_RETURN_UPDATE 1
#define DIRECTORY_RETURN_ERROR -1 #define DIRECTORY_RETURN_ERROR -1
Directory *mp3rootDirectory = NULL; static Directory *mp3rootDirectory;
time_t directory_dbModTime = 0; static time_t directory_dbModTime;
volatile int directory_updatePid = 0; static volatile int directory_updatePid;
volatile int directory_reReadDB = 0; static volatile int directory_reReadDB;
volatile mpd_uint16 directory_updateJobId = 0; static volatile mpd_uint16 directory_updateJobId;
static DirectoryList *newDirectoryList(); static DirectoryList *newDirectoryList();

View File

@ -24,7 +24,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
static List *inputPlugin_list = NULL; static List *inputPlugin_list;
void loadInputPlugin(InputPlugin * inputPlugin) void loadInputPlugin(InputPlugin * inputPlugin)
{ {
@ -59,7 +59,7 @@ static int stringFoundInStringArray(char **array, char *suffix)
InputPlugin *getInputPluginFromSuffix(char *suffix, unsigned int next) InputPlugin *getInputPluginFromSuffix(char *suffix, unsigned int next)
{ {
static ListNode *pos = NULL; static ListNode *pos;
ListNode *node; ListNode *node;
InputPlugin *plugin; InputPlugin *plugin;
@ -88,7 +88,7 @@ InputPlugin *getInputPluginFromSuffix(char *suffix, unsigned int next)
InputPlugin *getInputPluginFromMimeType(char *mimeType, unsigned int next) InputPlugin *getInputPluginFromMimeType(char *mimeType, unsigned int next)
{ {
static ListNode *pos = NULL; static ListNode *pos;
ListNode *node; ListNode *node;
InputPlugin *plugin; InputPlugin *plugin;

View File

@ -470,17 +470,6 @@ InputPlugin aacPlugin = {
#else #else
InputPlugin aacPlugin = { InputPlugin aacPlugin;
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
0,
NULL,
NULL,
};
#endif /* HAVE_FAAD */ #endif /* HAVE_FAAD */

View File

@ -183,17 +183,6 @@ InputPlugin audiofilePlugin = {
#else #else
InputPlugin audiofilePlugin = { InputPlugin audiofilePlugin;
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
0,
NULL,
NULL
};
#endif /* HAVE_AUDIOFILE */ #endif /* HAVE_AUDIOFILE */

View File

@ -525,17 +525,6 @@ InputPlugin flacPlugin = {
#else /* !HAVE_FLAC */ #else /* !HAVE_FLAC */
InputPlugin flacPlugin = { InputPlugin flacPlugin;
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
0,
NULL,
NULL,
};
#endif /* HAVE_FLAC */ #endif /* HAVE_FLAC */

View File

@ -92,8 +92,8 @@ static MDRIVER drv_mpd = {
VC_VoiceRealVolume VC_VoiceRealVolume
}; };
static int mod_mikModInitiated = 0; static int mod_mikModInitiated;
static int mod_mikModInitError = 0; static int mod_mikModInitError;
static int mod_initMikMod(void) static int mod_initMikMod(void)
{ {
@ -285,17 +285,6 @@ InputPlugin modPlugin = {
#else #else
InputPlugin modPlugin = { InputPlugin modPlugin;
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
0,
NULL,
NULL
};
#endif /* HAVE_AUDIOFILE */ #endif /* HAVE_AUDIOFILE */

View File

@ -1087,17 +1087,6 @@ InputPlugin mp3Plugin = {
}; };
#else #else
InputPlugin mp3Plugin = { InputPlugin mp3Plugin;
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
0,
NULL,
NULL
};
#endif #endif

View File

@ -450,17 +450,6 @@ InputPlugin mp4Plugin = {
#else #else
InputPlugin mp4Plugin = { InputPlugin mp4Plugin;
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
0,
NULL,
NULL
};
#endif /* HAVE_FAAD */ #endif /* HAVE_FAAD */

View File

@ -355,17 +355,6 @@ InputPlugin mpcPlugin = {
#else #else
InputPlugin mpcPlugin = { InputPlugin mpcPlugin;
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
0,
NULL,
NULL
};
#endif #endif

View File

@ -418,17 +418,6 @@ InputPlugin oggflacPlugin = {
#else /* !HAVE_FLAC */ #else /* !HAVE_FLAC */
InputPlugin oggflacPlugin = { InputPlugin oggflacPlugin;
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
0,
NULL,
NULL,
};
#endif /* HAVE_OGGFLAC */ #endif /* HAVE_OGGFLAC */

View File

@ -429,17 +429,6 @@ InputPlugin oggvorbisPlugin = {
#else /* !HAVE_OGGVORBIS */ #else /* !HAVE_OGGVORBIS */
InputPlugin oggvorbisPlugin = { InputPlugin oggvorbisPlugin;
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
0,
NULL,
NULL,
};
#endif /* HAVE_OGGVORBIS */ #endif /* HAVE_OGGVORBIS */

View File

@ -47,10 +47,10 @@
#define HTTP_REDIRECT_MAX 10 #define HTTP_REDIRECT_MAX 10
static char *proxyHost = NULL; static char *proxyHost;
static char *proxyPort = NULL; static char *proxyPort;
static char *proxyUser = NULL; static char *proxyUser;
static char *proxyPassword = NULL; static char *proxyPassword;
static int bufferSize = HTTP_BUFFER_SIZE_DEFAULT; static int bufferSize = HTTP_BUFFER_SIZE_DEFAULT;
static int prebufferSize = HTTP_PREBUFFER_SIZE_DEFAULT; static int prebufferSize = HTTP_PREBUFFER_SIZE_DEFAULT;

View File

@ -56,7 +56,7 @@
#define INTERFACE_MAX_OUTPUT_BUFFER_SIZE_DEFAULT (8192*1024) #define INTERFACE_MAX_OUTPUT_BUFFER_SIZE_DEFAULT (8192*1024)
/* set this to zero to indicate we have no possible interfaces */ /* set this to zero to indicate we have no possible interfaces */
static int interface_max_connections = 0; /*INTERFACE_MAX_CONNECTIONS_DEFAULT; */ static int interface_max_connections; /*INTERFACE_MAX_CONNECTIONS_DEFAULT; */
static int interface_timeout = INTERFACE_TIMEOUT_DEFAULT; static int interface_timeout = INTERFACE_TIMEOUT_DEFAULT;
static size_t interface_max_command_list_size = static size_t interface_max_command_list_size =
INTERFACE_MAX_COMMAND_LIST_DEFAULT; INTERFACE_MAX_COMMAND_LIST_DEFAULT;
@ -70,9 +70,9 @@ static struct ioOps *ioList;
static long int interface_list_cache_size = 32; static long int interface_list_cache_size = 32;
/* shared globally between all interfaces: */ /* shared globally between all interfaces: */
static struct strnode *list_cache = NULL; static struct strnode *list_cache;
static struct strnode *list_cache_head = NULL; static struct strnode *list_cache_head;
static struct strnode *list_cache_tail = NULL; static struct strnode *list_cache_tail;
typedef struct _Interface { typedef struct _Interface {
char buffer[INTERFACE_MAX_BUFFER_LENGTH]; char buffer[INTERFACE_MAX_BUFFER_LENGTH];
@ -98,7 +98,7 @@ typedef struct _Interface {
int send_buf_alloc; /* bytes actually allocated */ int send_buf_alloc; /* bytes actually allocated */
} Interface; } Interface;
static Interface *interfaces = NULL; static Interface *interfaces;
static void flushInterfaceBuffer(Interface * interface); static void flushInterfaceBuffer(Interface * interface);
@ -731,7 +731,7 @@ static void flushInterfaceBuffer(Interface * interface)
int interfacePrintWithFD(int fd, char *buffer, int buflen) int interfacePrintWithFD(int fd, char *buffer, int buflen)
{ {
static int i = 0; static int i;
int copylen; int copylen;
Interface *interface; Interface *interface;

View File

@ -45,9 +45,9 @@
ERROR("maybe MPD is still running?\n"); \ ERROR("maybe MPD is still running?\n"); \
} while (0); } while (0);
int *listenSockets = NULL; static int *listenSockets;
int numberOfListenSockets = 0; static int numberOfListenSockets;
static int boundPort = 0; static int boundPort;
static int establishListen(unsigned int port, static int establishListen(unsigned int port,
struct sockaddr *addrp, socklen_t addrlen) struct sockaddr *addrp, socklen_t addrlen)

View File

@ -31,11 +31,11 @@
#endif #endif
#endif #endif
static char *localeCharset = NULL; static char *localeCharset;
char *utf8ToLocaleCharset(char *str) char *utf8ToLocaleCharset(char *str)
{ {
static char *ret = NULL; static char *ret;
if (localeCharset) if (localeCharset)
ret = convCharset(localeCharset, "UTF-8", str, ret); ret = convCharset(localeCharset, "UTF-8", str, ret);

View File

@ -30,13 +30,13 @@
#include <time.h> #include <time.h>
static unsigned int logLevel = LOG_LEVEL_LOW; static unsigned int logLevel = LOG_LEVEL_LOW;
static int warningFlushed = 0; static int warningFlushed;
static int stdout_mode = 1; static int stdout_mode = 1;
static char *warningBuffer = NULL; static char *warningBuffer;
static int out_fd = -1; static int out_fd = -1;
static int err_fd = -1; static int err_fd = -1;
static const char *out_filename = NULL; static const char *out_filename;
static const char *err_filename = NULL; static const char *err_filename;
/* redirect stdin to /dev/null to work around a libao bug */ /* redirect stdin to /dev/null to work around a libao bug */
static void redirect_stdin(void) static void redirect_stdin(void)
@ -60,7 +60,7 @@ static void redirect_logs(void)
static const char *log_date(void) static const char *log_date(void)
{ {
static char buf[16] = { '\0' }; static char buf[16];
time_t t = time(NULL); time_t t = time(NULL);
strftime(buf, 16, "%b %d %H:%M : ", localtime(&t)); strftime(buf, 16, "%b %d %H:%M : ", localtime(&t));
return buf; return buf;

View File

@ -30,7 +30,7 @@
static mpd_sint16 currentChunk = -1; static mpd_sint16 currentChunk = -1;
static mpd_sint8 currentMetaChunk = -1; static mpd_sint8 currentMetaChunk = -1;
static mpd_sint8 sendMetaChunk = 0; static mpd_sint8 sendMetaChunk;
void clearAllMetaChunkSets(OutputBuffer * cb) void clearAllMetaChunkSets(OutputBuffer * cb)
{ {
@ -76,8 +76,8 @@ int sendDataToOutputBuffer(OutputBuffer * cb, InputStream * inStream,
mpd_uint16 chunkLeft; mpd_uint16 chunkLeft;
char *data; char *data;
size_t datalen; size_t datalen;
static char *convBuffer = NULL; static char *convBuffer;
static long convBufferLen = 0; static long convBufferLen;
if (cmpAudioFormat(&(cb->audioFormat), &(dc->audioFormat)) == 0) { if (cmpAudioFormat(&(cb->audioFormat), &(dc->audioFormat)) == 0) {
data = dataIn; data = dataIn;
@ -158,7 +158,7 @@ int sendDataToOutputBuffer(OutputBuffer * cb, InputStream * inStream,
int copyMpdTagToOutputBuffer(OutputBuffer * cb, MpdTag * tag) int copyMpdTagToOutputBuffer(OutputBuffer * cb, MpdTag * tag)
{ {
int nextChunk; int nextChunk;
static MpdTag *last = NULL; static MpdTag *last;
if (!cb->acceptMetadata || !tag) { if (!cb->acceptMetadata || !tag) {
sendMetaChunk = 0; sendMetaChunk = 0;

View File

@ -34,11 +34,11 @@
const char *musicDir; const char *musicDir;
static const char *playlistDir; static const char *playlistDir;
static char *fsCharset = NULL; static char *fsCharset;
char *fsCharsetToUtf8(char *str) char *fsCharsetToUtf8(char *str)
{ {
static char *ret = NULL; static char *ret;
ret = convCharset("UTF-8", fsCharset, str, ret); ret = convCharset("UTF-8", fsCharset, str, ret);
@ -52,7 +52,7 @@ char *fsCharsetToUtf8(char *str)
char *utf8ToFsCharset(char *str) char *utf8ToFsCharset(char *str)
{ {
static char *ret = NULL; static char *ret;
ret = convCharset(fsCharset, "UTF-8", str, ret); ret = convCharset(fsCharset, "UTF-8", str, ret);

View File

@ -137,10 +137,10 @@ void pcm_mix(char *buffer1, char *buffer2, size_t bufferSize1,
void pcm_convertAudioFormat(AudioFormat * inFormat, char *inBuffer, size_t void pcm_convertAudioFormat(AudioFormat * inFormat, char *inBuffer, size_t
inSize, AudioFormat * outFormat, char *outBuffer) inSize, AudioFormat * outFormat, char *outBuffer)
{ {
static char *bitConvBuffer = NULL; static char *bitConvBuffer;
static int bitConvBufferLength = 0; static int bitConvBufferLength;
static char *channelConvBuffer = NULL; static char *channelConvBuffer;
static int channelConvBufferLength = 0; static int channelConvBufferLength;
char *dataChannelConv; char *dataChannelConv;
int dataChannelLen; int dataChannelLen;
char *dataBitConv; char *dataBitConv;

View File

@ -297,7 +297,7 @@ int getPlayerError(void)
char *getPlayerErrorStr(void) char *getPlayerErrorStr(void)
{ {
static char *error = NULL; static char *error;
int errorlen = MAXPATHLEN + 1024; int errorlen = MAXPATHLEN + 1024;
PlayerControl *pc = &(getPlayerData()->playerControl); PlayerControl *pc = &(getPlayerData()->playerControl);
@ -504,8 +504,8 @@ void playerCycleLogFiles(void)
/* this actually creates a dupe of the current metadata */ /* this actually creates a dupe of the current metadata */
Song *playerCurrentDecodeSong(void) Song *playerCurrentDecodeSong(void)
{ {
static Song *song = NULL; static Song *song;
static MetadataChunk *prev = NULL; static MetadataChunk *prev;
Song *ret = NULL; Song *ret = NULL;
PlayerControl *pc = &(getPlayerData()->playerControl); PlayerControl *pc = &(getPlayerData()->playerControl);

View File

@ -83,9 +83,9 @@ static Playlist playlist;
static int playlist_state = PLAYLIST_STATE_STOP; static int playlist_state = PLAYLIST_STATE_STOP;
static int playlist_max_length = DEFAULT_PLAYLIST_MAX_LENGTH; static int playlist_max_length = DEFAULT_PLAYLIST_MAX_LENGTH;
static int playlist_stopOnError; static int playlist_stopOnError;
static int playlist_errorCount = 0; static int playlist_errorCount;
static int playlist_queueError; static int playlist_queueError;
static int playlist_noGoToNext = 0; static int playlist_noGoToNext;
static int playlist_saveAbsolutePaths = DEFAULT_PLAYLIST_SAVE_ABSOLUTE_PATHS; static int playlist_saveAbsolutePaths = DEFAULT_PLAYLIST_SAVE_ABSOLUTE_PATHS;
@ -1301,7 +1301,7 @@ int setPlaylistRandomStatus(int fd, int status)
int previousSongInPlaylist(int fd) int previousSongInPlaylist(int fd)
{ {
static time_t lastTime = 0; static time_t lastTime;
time_t diff = time(NULL) - lastTime; time_t diff = time(NULL) - lastTime;
lastTime += diff; lastTime += diff;

View File

@ -320,9 +320,9 @@ int updateSongInfo(Song * song)
* we free and recreate this memory we make sure to print it correctly*/ * we free and recreate this memory we make sure to print it correctly*/
char *getSongUrl(Song * song) char *getSongUrl(Song * song)
{ {
static char *buffer = NULL; static char *buffer;
static int bufferSize = 0; static int bufferSize;
static Song *lastSong = NULL; static Song *lastSong;
int slen; int slen;
int dlen; int dlen;
int size; int size;

View File

@ -41,7 +41,7 @@ static struct _sf_cb {
{ readPlaylistState, savePlaylistState }, { readPlaylistState, savePlaylistState },
}; };
static const char *sfpath = NULL; static const char *sfpath;
static void get_state_file_path(void) static void get_state_file_path(void)
{ {

View File

@ -26,15 +26,7 @@
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>
static Tree *tagTrees[TAG_NUM_OF_ITEM_TYPES] = { static Tree *tagTrees[TAG_NUM_OF_ITEM_TYPES];
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL
};
typedef struct tagTrackerItem { typedef struct tagTrackerItem {
int count; int count;

View File

@ -73,7 +73,7 @@ static int volume_ossControl = SOUND_MIXER_PCM;
#endif #endif
#ifdef HAVE_ALSA #ifdef HAVE_ALSA
static snd_mixer_t *volume_alsaMixerHandle = NULL; static snd_mixer_t *volume_alsaMixerHandle;
static snd_mixer_elem_t *volume_alsaElem; static snd_mixer_elem_t *volume_alsaElem;
static long volume_alsaMin; static long volume_alsaMin;
static long volume_alsaMax; static long volume_alsaMax;

View File

@ -46,11 +46,11 @@
#include <avahi-common/error.h> #include <avahi-common/error.h>
/* Static avahi data */ /* Static avahi data */
static AvahiEntryGroup *avahiGroup = NULL; static AvahiEntryGroup *avahiGroup;
static char *avahiName = NULL; static char *avahiName;
static AvahiClient* avahiClient = NULL; static AvahiClient* avahiClient;
static AvahiPoll avahiPoll; static AvahiPoll avahiPoll;
static int avahiRunning = 0; static int avahiRunning;
static int avahiFdset( fd_set* rfds, fd_set* wfds, fd_set* efds ); static int avahiFdset( fd_set* rfds, fd_set* wfds, fd_set* efds );
static int avahiFdconsume( int fdCount, fd_set* rfds, fd_set* wfds, fd_set* efds ); static int avahiFdconsume( int fdCount, fd_set* rfds, fd_set* wfds, fd_set* efds );