1. 30 Sep, 2016 4 commits
    • Kevin Locke's avatar
      configurator: Add output cflag option and macro · aacc2cb8
      Kevin Locke authored
      Unfortunately, not all compilers support -o as a command-line option for
      specifying the output file.  Visual Studio cl.exe issues warning D9035
      when -o is given, which is detected as a compile warning by the
      configurator.
      
      To support such compilers, add the command-line option -O to
      configurator which can be used to specify the cflag for setting the
      output executable file name.  Additionally define the macro
      CCAN_OUTPUT_EXE_CFLAG in config.h and use it when invoking the compiler
      (e.g.  from ccanlint).
      
      For reference, the name CCAN_OUTPUT_EXE_CFLAG was chosen to avoid
      potential name conflicts in the future due to cl.exe requiring different
      flags for different types of output[1] (e.g. object files are /Fo:).
      
      1.  https://msdn.microsoft.com/en-us/library/f1cb223a.aspxSigned-off-by: default avatarKevin Locke <kevin@kevinlocke.name>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      aacc2cb8
    • Kevin Locke's avatar
      configurator: Print test source without cat · fcdcba92
      Kevin Locke authored
      Windows does not provide cat.  Instead, copy the test source to stdout
      using the file stream to which it was written.
      
      Changes since v1:
      - Create fwrite_noeintr to avoid EINTR in fwrite without writing any
        data.
      - Handle short reads from fread.  This can happen with non-conformant
        libc or if EINTR occurs after reading some data.
      - Handle short writes from fwrite.  This can happen with non-conformant
        libc or if EINTR occurs after writing some data.
      
      Changes since v2:
      - Revert fwrite_noeintr and short read/write changes.
      Signed-off-by: default avatarKevin Locke <kevin@kevinlocke.name>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      fcdcba92
    • Kevin Locke's avatar
      configurator: Inline err.h functions · 888660c3
      Kevin Locke authored
      On systems where err.h is not provided (e.g. MSVC) configurator must
      provide its own definition.  The err module can not be used by
      configurator due to its dependency on config.h, so the relevant source
      is copied into configurator with the minimum changes necessary.
      
      Changes since v2:
      - Use the CCAN err module sources instead of musl libc sources to avoid
        introducing another implementation of these functions.
      - Prefix err.h functions with "c12r_" to avoid name conflicts and
        "static declaration follows non-static" errors.
      Signed-off-by: default avatarKevin Locke <kevin@kevinlocke.name>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      888660c3
    • Kevin Locke's avatar
      configurator: Reimplement run using popen · 93992ee3
      Kevin Locke authored
      Rather than using fork+pipe+system+waitpid, most of which are only
      available on POSIX-like systems, use popen which is also available on
      Windows (under the name _popen).
      
      Changes since v1:
      - Create fread_noeintr to avoid EINTR in fread without reading any data.
      - Handle short reads from fread.  This can happen with non-conformant
        libc or if EINTR occurs after reading some data.
      - Define _POSIX_C_SOURCE for popen/pclose with strict implementations
        which require it (e.g. gcc with -std=c11).
      
      Changes since v2:
      - Revert fread_noeintr and short read changes in v1 as unnecessary.
      Signed-off-by: default avatarKevin Locke <kevin@kevinlocke.name>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      93992ee3
  2. 29 Sep, 2016 1 commit
  3. 28 Sep, 2016 1 commit
  4. 27 Sep, 2016 8 commits
  5. 21 Sep, 2016 1 commit
  6. 08 Sep, 2016 4 commits
  7. 07 Sep, 2016 1 commit
  8. 31 Aug, 2016 1 commit
    • Jon Griffiths's avatar
      Add a SHA512 implementation · 5e37a0fe
      Jon Griffiths authored
      This largely follows the SHA256 style. I've named Rusty as the maintainer.
      
      Currently the functions to add data of various sizes/endianness have not
      been implemented: There are no public test vectors for these cases and
      I believe most use cases are working on byte buffers. They can be added
      later if desired.
      
      The openssl implementation has been tested on x86-64, while the inbuilt
      version has been tested on 32/64 bit, little/big endian boxes.
      Signed-off-by: default avatarJon Griffiths <jon_p_griffiths@yahoo.com>
      5e37a0fe
  9. 30 Aug, 2016 5 commits
  10. 29 Aug, 2016 9 commits
  11. 24 Aug, 2016 4 commits
  12. 23 Aug, 2016 1 commit