Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 17th, 2012  |  syntax: None  |  size: 1.22 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. commit 37060e8098d2e0aaf112c00a6e91cd64074469c8
  2. Author: David Nadlinger <code@klickverbot.at>
  3. Date:   Mon Apr 25 19:27:44 2011 +0200
  4.  
  5.     Don't redeclare strlen in tango.net.device.Berkeley.
  6.    
  7.     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.
  8.  
  9. diff --git a/tango/net/device/Berkeley.d b/tango/net/device/Berkeley.d
  10. index 7fcdd3e..5ee5284 100644
  11. --- a/tango/net/device/Berkeley.d
  12. +++ b/tango/net/device/Berkeley.d
  13. @@ -6,18 +6,13 @@ private import tango.core.Exception;
  14.  
  15.  import  consts=tango.sys.consts.socket;
  16.  
  17. +private import tango.stdc.string : strlen;
  18.  private import  tango.stdc.stringz;
  19.  
  20.  /*******************************************************************************
  21.  
  22.  *******************************************************************************/
  23.  
  24. -private extern(C) int strlen(char*);
  25. -
  26. -/*******************************************************************************
  27. -
  28. -*******************************************************************************/
  29. -
  30.  enum {SOCKET_ERROR = consts.SOCKET_ERROR}
  31.  
  32.  /*******************************************************************************