diff options
author | lloyd <[email protected]> | 2007-12-24 20:54:30 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2007-12-24 20:54:30 +0000 |
commit | 769e503fd8e4cf0f3072e04afffb61db5b48d777 (patch) | |
tree | b5d5c5e88bcfa0c3790571c82cde222bec1addb3 /modules/es_egd/es_egd.cpp | |
parent | cf2f188f4ad96abb26400e2dc62e2012826d10e7 (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/es_egd.cpp')
-rw-r--r-- | modules/es_egd/es_egd.cpp | 14 |
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; } |