aboutsummaryrefslogtreecommitdiffstats
path: root/modules/es_egd
diff options
context:
space:
mode:
authorlloyd <[email protected]>2007-12-24 20:54:30 +0000
committerlloyd <[email protected]>2007-12-24 20:54:30 +0000
commit769e503fd8e4cf0f3072e04afffb61db5b48d777 (patch)
treeb5d5c5e88bcfa0c3790571c82cde222bec1addb3 /modules/es_egd
parentcf2f188f4ad96abb26400e2dc62e2012826d10e7 (diff)
Qualify (some) calls to functions in the global namespace using an
explicit :: (it is unfortunate that there is no good way to detect all of such calls in an automated manner). Also use new-style casts in parts of the zlib code.
Diffstat (limited to 'modules/es_egd')
-rw-r--r--modules/es_egd/es_egd.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/es_egd/es_egd.cpp b/modules/es_egd/es_egd.cpp
index 2c377b387..2fbd03598 100644
--- a/modules/es_egd/es_egd.cpp
+++ b/modules/es_egd/es_egd.cpp
@@ -52,25 +52,25 @@ u32bit EGD_EntropySource::do_poll(byte output[], u32bit length,
throw Exception("EGD_EntropySource: Socket path is too long");
std::strcpy(addr.sun_path, path.c_str());
- int fd = socket(addr.sun_family, SOCK_STREAM, 0);
+ int fd = ::socket(addr.sun_family, SOCK_STREAM, 0);
if(fd == -1) return 0;
int len = sizeof(addr.sun_family) + std::strlen(addr.sun_path) + 1;
- if(connect(fd, reinterpret_cast<struct sockaddr*>(&addr), len))
- { close(fd); return 0; }
+ if(::connect(fd, reinterpret_cast<struct ::sockaddr*>(&addr), len))
+ { ::close(fd); return 0; }
byte buffer[2];
buffer[0] = 1;
buffer[1] = static_cast<byte>(length);
- if(write(fd, buffer, 2) != 2) { close(fd); return 0; }
- if(read(fd, buffer, 1) != 1) { close(fd); return 0; }
+ if(::write(fd, buffer, 2) != 2) { ::close(fd); return 0; }
+ if(::read(fd, buffer, 1) != 1) { ::close(fd); return 0; }
- ssize_t count = read(fd, output, buffer[0]);
+ ssize_t count = ::read(fd, output, buffer[0]);
if(count == -1) { close(fd); return 0; }
- close(fd);
+ ::close(fd);
return count;
}