<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 02/20/2013 03:57 PM, Andrew Cooper wrote:
    <blockquote cite="mid:512562F0.3030907@gmail.com" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <br>
      <div class="moz-cite-prefix">On 20/02/2013 14:14, Adam Woodbeck
        wrote:<br>
      </div>
      <blockquote
cite="mid:CAGkRLJpooHQvqx=vvbyg1Mgy+6yrnuvYoiGbtM7i7fYEqhN_Mw@mail.gmail.com"
        type="cite">
        <div dir="ltr">
          <div>
            <div>Has anyone successfully built pycrypto 2.6 on HP-UX
              11.31?  I'm having a slight struggle with the build
              process, the latest of which are the following errors:<br>
              <br>
              <div style="margin-left:40px"> "src/hash_SHA2.h", line 91:
                error #2020: identifier "U32" is undefined<br>
                  typedef U32 sha2_word_t;<br>
                <br>
                "src/hash_SHA2_template.c", line 175: error #2020:
                identifier "U8" is undefined<br>
                  hash_update (hash_state *self, const U8 *buf, int len)<br>
                <br>
                2 errors detected in the compilation of "src/SHA256.c".<br>
              </div>
            </div>
          </div>
        </div>
      </blockquote>
      Probably worth using uint32_t and uint8_t respectively, as they
      substantially more standard than U32 and U8 in the world of C.<br>
    </blockquote>
    I think the problem is in src/hash_SHA2.h.  There's no #else case,
    and there probably should be:
    <blockquote>/* determine fixed size types */<br>
      #if defined(__STDC_VERSION__) && (__STDC_VERSION__ >=
      199901L)<br>
      #include <stdint.h><br>
      typedef uint8_t                U8;<br>
      typedef uint32_t            U32;<br>
      typedef uint64_t            U64;<br>
      #elif defined(_MSC_VER)<br>
      typedef unsigned char        U8;<br>
      typedef unsigned __int64    U64;<br>
      typedef unsigned int        U32;<br>
      #elif defined(__sun) || defined(__sun__)<br>
      #include <sys/inttypes.h><br>
      typedef uint8_t                U8;<br>
      typedef uint32_t            U32;<br>
      typedef uint64_t            U64;<br>
      #endif<br>
    </blockquote>
    Actually, the problem is that there are a bunch of different ways
    that integer types are being defined in PyCrypto.  Time to move this
    over to a common include file and let autoconf figure out the
    details.<br>
    <br>
    Adam, could you pull the hpux-wip branch of pycrypto, run "python
    setup.py build test" and see if it works with my changes?  (Don't
    derive your own branches on top of -wip branches, though, since I
    delete/rebase them often!)<br>
    <br>
    Basic instructions are as follows:<br>
    <br>
        git clone <a class="moz-txt-link-freetext" href="https://github.com/dlitz/pycrypto">https://github.com/dlitz/pycrypto</a><br>
        cd pycrypto<br>
        git checkout hpux-wip<br>
        python setup.py build test<br>
    <br>
    Alternatively, if you don't have git installed, you can do this:<br>
    <br>
        # somehow download and unzip
<a class="moz-txt-link-freetext" href="https://github.com/dlitz/pycrypto/archive/11559ddebbba3a4d4552a5038392d1cbaf11fbe6.zip">https://github.com/dlitz/pycrypto/archive/11559ddebbba3a4d4552a5038392d1cbaf11fbe6.zip</a><br>
       
    cd pycrypto-1159dd*<br>
        python setup.py build test<br>
    <br>
    If this works, I'll apply the changes to the master branch and
    include it in the next release.<br>
    <br>
    Cheers,<br>
    - Dwayne<br>
  </body>
</html>