Closed GoogleCodeExporter closed 9 years ago
Correct patch file for bcrypt.c
Original comment by pet...@gmail.com
on 20 May 2013 at 11:27
Attachments:
Built okay on CentOS 6.3 with gcc 4.4.6.
Original comment by pet...@gmail.com
on 20 May 2013 at 2:14
There is a typo, I meant py-bcrypt 0.3 on Windows 7. MinGW is gcc 4.6.2.
Original comment by pet...@gmail.com
on 20 May 2013 at 2:18
Could you please try the current hg tip? It has a number of fixes for windows
that seem roughly equivalent to these. Unfortunately, I don't have access to
MSVC anymore to test on Windows.
Original comment by d...@djm.net.au
on 28 Jul 2013 at 12:03
The u_int8_t, etc. typedefs are in pybc_blf.h but not bcrypt_python.c. Patch
attached to remedy that.
I do not have MSVC either, this is tested with MinGW.
Original comment by pet...@gmail.com
on 28 Jul 2013 at 10:26
Attachments:
Thanks for the quick response. Sorry about that, I thought bcrypt_python
included the header for some reason but it didn't. It does now :)
Please give tip another try. There is some new code there that may have other
problems on Windows.
Original comment by d...@djm.net.au
on 29 Jul 2013 at 5:24
Indeed it does. There are three problems, with fixes or advice.
1 u_int*_t missing in places:
Patch pre2 attached which creates pybc_types.h.
2 Various warnings about pointer signedness:
I have not addressed these, you should either fix the declarations or insert
casts.
3 Error for BYTE_ORDER undefined in sha2.c:
That is tricky to deal with portably in the preprocessor. Patch pre3 uses a
code snippet I have used in the past which determines endianness at compile
time.
Original comment by pet...@gmail.com
on 29 Jul 2013 at 9:26
Attachments:
Thanks for your patience in testing.
I don't think pre2 is necessary - pybc_sha2.h is only ever included after
pybc_blf.h which contains the type definitions. The definitions in pybc_blf.h
were missing u_int64_t for windows systems without stdint.h, so I've added it
now.
tip also has a slightly different endian test and fixes all the
pointer-signedness warnings on the platforms I have available.
Could you give it another try?
Original comment by d...@djm.net.au
on 29 Jul 2013 at 12:26
That has fixed the errors and warnings now, thanks. I have successfully built
and run test/test.py, passing all 5 tests.
Python 2.7.5
Windows 7 64-bit (though using 32 bit Python and py-bcrypt)
MinGW gcc version 4.6.2
Original comment by pet...@gmail.com
on 29 Jul 2013 at 1:15
Excellent - thanks for your help!
Original comment by d...@djm.net.au
on 29 Jul 2013 at 10:00
Original issue reported on code.google.com by
pet...@gmail.com
on 20 May 2013 at 10:00Attachments: