waseem786 / py-bcrypt

Automatically exported from code.google.com/p/py-bcrypt
Other
0 stars 0 forks source link

Build failure on mingw32 with solution #9

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. ~/pydistutils.cfg has compiler = mingw32 in [build]
2. pip install py-bcrypt
3. python test\test.py

What is the expected output? What do you see instead?
Clean install.
Compile errors for u_int8_t. After fixing those segfaults calling hashpw.

What version of the product are you using? On what operating system?
py-bcrypt 0.2 on Windows 7. MinGW is gcc 4.6.2.

Please provide any additional information below.
The two attached patches address a number of problems.
1. u_int8_t, etc. are not standard C.
2. strdup on Windows is deprecated since VS2005, using _strdup instead.
3. Explicit cast added calling encode_salt.
4. Move declarations to start of block.
5. memset to zero password and salt copies (duplicate of other patches).

This is only tested on mingw32 but the ifdefs should be good for other 
platforms.

Original issue reported on code.google.com by pet...@gmail.com on 11 Jun 2012 at 11:51

Attachments:

GoogleCodeExporter commented 8 years ago
This duplicates issue 3 to a large extent.

The #ifdef for C99 failed when I retested, more work is needed.

Original comment by pet...@gmail.com on 11 Jun 2012 at 1:16

GoogleCodeExporter commented 8 years ago
Patch applied with a small tweak (C99 types are preferred if they exist). This 
will be in the py-bcrypt-0.4 release and is in hg tip now.

Original comment by d...@djm.net.au on 28 Jul 2013 at 12:01

GoogleCodeExporter commented 8 years ago
Successfully installed py-bcrypt 0.4 from PyPI. Passes all 5 py-bcrypt tests 
and my own tests.

Python 2.7.5
Windows 7 64 bit (but 32 bit versions of Python / py-bcrypt)
MinGW 4.6.2

Original comment by pet...@gmail.com on 30 Aug 2013 at 9:48