diff options
| author | Sebastien Estienne <sebastien.estienne@gmail.com> | 2005-11-14 22:26:06 +0000 | 
|---|---|---|
| committer | Sebastien Estienne <sebastien.estienne@gmail.com> | 2005-11-14 22:26:06 +0000 | 
| commit | 56d97acfa37cbf4cfe2a038f76dcc00ea63c9149 (patch) | |
| tree | 952eb0e34cab95f216915dafd7187d2b6cd10be1 | |
| parent | 20c18433ce13ec9ecaa22e68171a34f3aff0e71e (diff) | |
* implement avahi_exe_name for BSD/Darwin
* no more sebest in the TOO :) 
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@961 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
| -rw-r--r-- | avahi-compat-libdns_sd/warn.c | 13 | ||||
| -rw-r--r-- | configure.ac | 2 | ||||
| -rw-r--r-- | docs/TODO | 1 | 
3 files changed, 5 insertions, 11 deletions
diff --git a/avahi-compat-libdns_sd/warn.c b/avahi-compat-libdns_sd/warn.c index 8d766c3..13586ef 100644 --- a/avahi-compat-libdns_sd/warn.c +++ b/avahi-compat-libdns_sd/warn.c @@ -46,9 +46,10 @@  static pthread_mutex_t linkage_mutex = PTHREAD_MUTEX_INITIALIZER;  static int linkage_warning = 0; -#ifdef __linux__ -  const char *avahi_exe_name(void) { +#ifdef HAVE_GETPROGNAME +    return getprogname(); +#elif defined(__linux__)      static char exe_name[1024] = "";      static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; @@ -76,19 +77,13 @@ const char *avahi_exe_name(void) {      pthread_mutex_unlock(&mutex);      return exe_name; -} -  #else -  #ifdef __GNUC__  #warning "avahi_exe_name() needs to be implemented for your operating system"  #endif - -const char *avahi_exe_name(void) {      return "(unknown)"; -} -  #endif +}  void avahi_warn(const char *fmt, ...) {      char msg[512]  = "*** WARNING *** "; diff --git a/configure.ac b/configure.ac index 88ab3a5..6b83eed 100644 --- a/configure.ac +++ b/configure.ac @@ -206,7 +206,7 @@ AC_FUNC_MEMCMP  AC_FUNC_SELECT_ARGTYPES  AC_FUNC_MALLOC  AC_FUNC_REALLOC -AC_CHECK_FUNCS([gethostname memchr memmove memset mkdir select socket strchr strcspn strdup strerror strrchr strspn strstr uname setresuid setreuid setresgid setregid strcasecmp gettimeofday putenv strncasecmp strlcpy gethostbyname seteuid setegid setproctitle]) +AC_CHECK_FUNCS([gethostname memchr memmove memset mkdir select socket strchr strcspn strdup strerror strrchr strspn strstr uname setresuid setreuid setresgid setregid strcasecmp gettimeofday putenv strncasecmp strlcpy gethostbyname seteuid setegid setproctitle getprogname])  AC_FUNC_CHOWN  AC_FUNC_STAT @@ -4,7 +4,6 @@ for 0.6:  * Expose AvahiSRecordBrowser over D-BUS and implement in avahi-client [lathiat]  * fix python scripts  * update man pages -* portability: implement avahi_exe_name() in avahi-compat-libdns_sd/warn.c on non-linux architectures [sebest]  later:  * add simplification routine for adding services   | 
