
Untitled
By: a guest on
Apr 17th, 2012 | syntax:
None | size: 1.22 KB | hits: 10 | expires: Never
commit 37060e8098d2e0aaf112c00a6e91cd64074469c8
Author: David Nadlinger <code@klickverbot.at>
Date: Mon Apr 25 19:27:44 2011 +0200
Don't redeclare strlen in tango.net.device.Berkeley.
What makes this worse than just some code duplication is the fact that the declaration had an int return type (which is not the same as size_t on x86_64) and thus ICE'd LDC with inlining enabled.
diff --git a/tango/net/device/Berkeley.d b/tango/net/device/Berkeley.d
index 7fcdd3e..5ee5284 100644
--- a/tango/net/device/Berkeley.d
+++ b/tango/net/device/Berkeley.d
@@ -6,18 +6,13 @@ private import tango.core.Exception;
import consts=tango.sys.consts.socket;
+private import tango.stdc.string : strlen;
private import tango.stdc.stringz;
/*******************************************************************************
*******************************************************************************/
-private extern(C) int strlen(char*);
-
-/*******************************************************************************
-
-*******************************************************************************/
-
enum {SOCKET_ERROR = consts.SOCKET_ERROR}
/*******************************************************************************