Only build and use the compat.c bsd_setenv/bsd_putenv/bsd_unsetenv on systems
that don't provide the POSIX setenv(). This fixes building plugins that link to compat.c on OS X (shared libraries on OS X don't have direct access to environ). It also reduces the binary size on platforms which provide setenv(), which these days is most of them. git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@382 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
@@ -195,6 +195,9 @@
|
||||
/* Define to 1 if you have the `select' function. */
|
||||
#undef HAVE_SELECT
|
||||
|
||||
/* Define to 1 if you have the `setenv' function. */
|
||||
#undef HAVE_SETENV
|
||||
|
||||
/* Define to 1 if you have the `setsid' function. */
|
||||
#undef HAVE_SETSID
|
||||
|
||||
|
||||
@@ -263,10 +263,13 @@ char *ulongcomma (unsigned long);
|
||||
unsigned long strtoul (const char *, char **, int);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SETENV
|
||||
char * bsd_getenv (const char *);
|
||||
int bsd_putenv (const char *);
|
||||
int bsd_setenv (const char *, const char *, int);
|
||||
void bsd_unsetenv (const char *);
|
||||
#define setenv bsd_setenv
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_INET_ATON
|
||||
int inet_aton (const char *, struct in_addr *);
|
||||
|
||||
Reference in New Issue
Block a user