Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pike
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
9f6f4ddd
Commit
9f6f4ddd
authored
27 years ago
by
Fredrik Hübinette (Hubbe)
Browse files
Options
Downloads
Patches
Plain Diff
now works with windows NT
Rev: lib/modules/Protocols.pmod/DNS.pmod:1.11
parent
024627db
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/modules/Protocols.pmod/DNS.pmod
+22
-1
22 additions, 1 deletion
lib/modules/Protocols.pmod/DNS.pmod
with
22 additions
and
1 deletion
lib/modules/Protocols.pmod/DNS.pmod
+
22
−
1
View file @
9f6f4ddd
...
...
@@ -223,7 +223,16 @@ class client {
static private string match_etc_hosts(string host)
{
if (!etc_hosts) {
string raw = Stdio.read_file("/etc/hosts");
string raw;
#ifdef __NT__
raw = RegGetValue(HKEY_LOCAL_MACHINE,
"SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters",
"DataBasePath");
raw+="\\hosts";
#else
raw="/etc/hosts";
#endif
raw = Stdio.read_file(raw);
etc_hosts = ([ "localhost":"127.0.0.1" ]);
...
...
@@ -257,6 +266,17 @@ class client {
if(!server)
{
string domain;
#if __NT__
domain=RegGetValue(HKEY_LOCAL_MACHINE,
"SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters",
"Domain");
nameservers = ({ RegGetValue(HKEY_LOCAL_MACHINE,
"SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters",
"NameServer") });
domains=RegGetValue(HKEY_LOCAL_MACHINE,
"SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters",
"SearchList") / " "- ({""});
#else
string resolv_conf = Stdio.read_file("/etc/resolv.conf");
if (!resolv_conf) {
...
...
@@ -301,6 +321,7 @@ class client {
break;
}
}
#endif
if (!sizeof(nameservers)) {
nameservers = ({ "127.0.0.1" });
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment