1. 25 Sep, 2015 4 commits
    • Mikio Hara's avatar
      syscall: fix alignment check for link-layer information on BSD variants · 707b619c
      Mikio Hara authored
      When link-layer information is wrapped with sockaddr_dl, we need to
      follow the len field of sockaddr_dl. When link-layer information is
      naked, we need to use the length of whole link-layer information.
      
      Fixes #12641.
      
      Change-Id: I4d377f64cbab1760b993fc55c719288616042bbb
      Reviewed-on: https://go-review.googlesource.com/14939Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      707b619c
    • Rob Pike's avatar
      doc: go1.6.txt: bufio.ErrFinalToken · 81fada52
      Rob Pike authored
      Change-Id: I2714faa6e8aa7b81a05f0e015b045a57407d808d
      Reviewed-on: https://go-review.googlesource.com/14996Reviewed-by: default avatarRob Pike <r@golang.org>
      81fada52
    • Rob Pike's avatar
      bufio: fix scanning with a final empty token. · ec127547
      Rob Pike authored
      The Scan function's interface to the split function was not sufficient
      to handle an empty final token in a pure function; state was required.
      This was ugly.
      
      We introduce a special error value that a split function can return
      that signals that this token is OK, but is the last one and scanning
      should stop immediately _after_ this token.
      
      The same effect could be achieved using the same trick (a special
      error value) and checking for that error after Scan finishes, but it's
      a little clumsy. Providing a published sentinel value in bufio is
      cleaner and means everyone can use the same trick. The result
      is an error-free scan.
      
      Rewrite the test (that was only barely working) to use the value
      and be more robust.
      
      Also write a new example showing how to do it.
      
      Fixes #11836
      
      Change-Id: Iaae77d0f95b4a2efa0175ced94d93c66353079e8
      Reviewed-on: https://go-review.googlesource.com/14924Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      ec127547
    • Shawn Walker-Salas's avatar
      cmd/go: elide -rpath when not applicable and used via LDFLAGS · dc6df1b0
      Shawn Walker-Salas authored
      Some linker flags should only be applied when performing the final
      linking step for a shared library or executable, etc. In other
      contexts, they're either invalid, or meaningless to apply (so should
      not be specified).
      
      When an external linker is used (either directly by Go or by the
      compiler driver used by cgo), -rpath and -rpath-link should only be
      specified in the final linking step.  On platforms such as Solaris,
      ld(1) will reject its use in any other scenario (such as when linking
      relocatable objects).
      
      This change is necessary because Go does not currently offer a way to
      specify LDFLAGS based on when they should be applied.
      
      Fixes #12115
      
      Change-Id: If35a18d8eee8ec7ddcca2d4ccd41ab6ffcf93b41
      Reviewed-on: https://go-review.googlesource.com/14674Reviewed-by: default avatarMinux Ma <minux@golang.org>
      Run-TryBot: Minux Ma <minux@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      dc6df1b0
  2. 24 Sep, 2015 8 commits
  3. 23 Sep, 2015 17 commits
  4. 22 Sep, 2015 6 commits
  5. 21 Sep, 2015 5 commits