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;
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 *** ";
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
* 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