Roxen.git/server/etc/modules/Roxen.pmod:1:
// This is a roxen pike module. Copyright © 1999 - 2009, Roxen IS.
//
- // $Id: Roxen.pmod,v 1.307 2011/02/15 13:36:57 grubba Exp $
+ // $Id: Roxen.pmod,v 1.308 2011/02/28 13:58:33 grubba Exp $
#include <roxen.h>
#include <config.h>
#include <version.h>
#include <module.h>
#include <stat.h>
#define roxen roxenp()
#ifdef HTTP_DEBUG
# define HTTP_WERR(X) report_debug("HTTP: "+X+"\n");
Roxen.git/server/etc/modules/Roxen.pmod:5000: Inside #if undefined(NO_DNS)
#ifndef NO_DNS
catch(dns=roxen->gethostbyname(hosts[0]));
if(dns && sizeof(dns))
hosts+=dns[2]+dns[1];
if (!local_addrs) {
string ifconfig =
Process.locate_binary(({ "/sbin", "/usr/sbin", "/bin", "/usr/bin",
"/etc" }), "ifconfig");
local_addrs = dns[1];
if (ifconfig) {
- foreach(Process.run(({ ifconfig, "-a" }))->stdout/"\n", string line) {
+ foreach(Process.run(({ ifconfig, "-a" }),
+ ([ "env":getenv() +
+ ([
+ // Make sure the output is not affected
+ // by the locale. cf [bug 5898].
+ "LC_ALL":"C",
+ "LANG":"C",
+ ])]))->stdout/"\n", string line) {
int i;
// We need to parse lines with the following formats:
//
// IPv4:
// inet 127.0.0.1 Solaris, MacOS X.
// inet addr:127.0.0.1 Linux.
//
// IPv6:
// inet6 ::1 MacOS X.