1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

Wrapped popen calls in HAVE_POPEN - needed if we are to add the

env patch.
Jeremy.
(This used to be commit 94c075faee88538e48d1898f1694500b8a5d4c8b)
This commit is contained in:
Jeremy Allison 2000-01-29 00:23:40 +00:00
parent ebfef23a7d
commit 21df01ff7d
5 changed files with 11 additions and 2 deletions

2
source3/configure vendored
View File

@ -4203,7 +4203,7 @@ else
fi
done
for ac_func in initgroups select rdchk getgrnam getgrent pathconf
for ac_func in initgroups select rdchk getgrnam getgrent pathconf popen
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:4210: checking for $ac_func" >&5

View File

@ -352,7 +352,7 @@ AC_CHECK_FUNCS(waitpid getcwd strdup strtoul strerror chown chmod chroot)
AC_CHECK_FUNCS(fstat strchr utime utimes getrlimit fsync bzero memset)
AC_CHECK_FUNCS(memmove vsnprintf snprintf setsid glob strpbrk pipe crypt16 getauthuid)
AC_CHECK_FUNCS(strftime sigprocmask sigblock sigaction innetgr setnetgrent getnetgrent endnetgrent)
AC_CHECK_FUNCS(initgroups select rdchk getgrnam getgrent pathconf)
AC_CHECK_FUNCS(initgroups select rdchk getgrnam getgrent pathconf popen)
AC_CHECK_FUNCS(setpriv setgidx setuidx setgroups mktime rename ftruncate stat64 fstat64)
AC_CHECK_FUNCS(lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64)
AC_CHECK_FUNCS(fseek64 fseeko64 ftell64 ftello64 setluid yp_get_default_domain getpwanam)

View File

@ -547,6 +547,9 @@
/* Define if you have the pipe function. */
#undef HAVE_PIPE
/* Define if you have the popen function. */
#undef HAVE_POPEN
/* Define if you have the pread function. */
#undef HAVE_PREAD

View File

@ -47,6 +47,7 @@ static printer_t *printers = NULL;
static void populate_printers(void)
{
#ifdef HAVE_POPEN
FILE *fp;
if ((fp = popen("/usr/bin/lpstat -v", "r")) != NULL) {
@ -91,6 +92,9 @@ static void populate_printers(void)
} else {
DEBUG(0,( "Unable to run lpstat!\n"));
}
#else
DEBUG(0,( "No popen() defined: Unable to run lpstat!\n"));
#endif
}

View File

@ -208,6 +208,7 @@ static SMB_BIG_UINT disk_free(char *path, BOOL small_query,
* If external disk calculation specified, use it.
*/
#ifdef HAVE_POPEN
dfree_command = lp_dfree_command();
if (dfree_command && *dfree_command) {
pstring line;
@ -249,6 +250,7 @@ static SMB_BIG_UINT disk_free(char *path, BOOL small_query,
fsusage(path, dfree, dsize);
}
} else
#endif /* HAVE_POPEN */
fsusage(path, dfree, dsize);
if (disk_quotas(path, &bsize_q, &dfree_q, &dsize_q)) {