[Bcrypt-users] Build on Cygwin
Status: Beta
Brought to you by:
jwshelley
From: Yves C. <no...@x0...> - 2015-04-12 10:41:27
|
Hi, I am working on a more standard implementation of VimCrypt which use blowfish. So I took a look at bcrypt. I am currently working on Cygwin and Debian. In both distrib I get warning during the build process. I am not happy with that (see output below). Fortunately casa (https://github.com/casta/bcrypt) offered a nice github repo. It would be nice to switch to this new repository and link the debian package on it? Also we can add a travis.yml? On Cygwin: ``` $ wget http://bcrypt.sourceforge.net/bcrypt-1.1.tar.gz $ tar xvzf bcrypt-1.1.tar.gz $ cd bcrypt-1.1/ $ make gcc -O2 -Wall -c main.c main.c:15:14: warning: ‘optarg’ redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] extern char *optarg; ^ main.c:16:12: warning: ‘optind’ redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] extern int optind, optreset, opterr; ^ main.c:16:20: warning: ‘optreset’ redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] extern int optind, optreset, opterr; ^ main.c:16:30: warning: ‘opterr’ redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] extern int optind, optreset, opterr; ^ gcc -O2 -Wall -c blowfish.c gcc -O2 -Wall -c rwfile.c gcc -O2 -Wall -c keys.c keys.c: In function ‘mutateKey’: keys.c:88:23: warning: pointer targets in passing argument 2 of ‘Blowfish_Init’ differ in signedness [-Wpointer-sign] Blowfish_Init(&ctx, *key, strlen(*key)); ^ In file included from functions.h:11:0, from keys.c:12: blowfish.h:15:6: note: expected ‘unsigned char *’ but argument is of type ‘char *’ void Blowfish_Init(BLOWFISH_CTX *ctx, unsigned char *key, int keyLen); ^ gcc -O2 -Wall -c wrapbf.c wrapbf.c: In function ‘BFEncrypt’: wrapbf.c:31:24: warning: pointer targets in passing argument 2 of ‘Blowfish_Init’ differ in signedness [-Wpointer-sign] Blowfish_Init (&ctx, key, MAXKEYBYTES); ^ In file included from functions.h:11:0, from wrapbf.c:12: blowfish.h:15:6: note: expected ‘unsigned char *’ but argument is of type ‘char *’ void Blowfish_Init(BLOWFISH_CTX *ctx, unsigned char *key, int keyLen); ^ wrapbf.c: In function ‘BFDecrypt’: wrapbf.c:84:24: warning: pointer targets in passing argument 2 of ‘Blowfish_Init’ differ in signedness [-Wpointer-sign] Blowfish_Init (&ctx, mykey, MAXKEYBYTES); ^ In file included from functions.h:11:0, from wrapbf.c:12: blowfish.h:15:6: note: expected ‘unsigned char *’ but argument is of type ‘char *’ void Blowfish_Init(BLOWFISH_CTX *ctx, unsigned char *key, int keyLen); ^ gcc -O2 -Wall -c endian.c gcc -O2 -Wall -c wrapzl.c gcc -O2 -Wall -o bcrypt main.o blowfish.o rwfile.o keys.o wrapbf.o endian.o wrapzl.o -L/usr/local/lib -lz ``` On Debain ``` $ make gcc -O2 -Wall -c main.c gcc -O2 -Wall -c blowfish.c gcc -O2 -Wall -c rwfile.c gcc -O2 -Wall -c keys.c keys.c: In function ‘mutateKey’: keys.c:88:23: warning: pointer targets in passing argument 2 of ‘Blowfish_Init’ differ in signedness [-Wpointer-sign] Blowfish_Init(&ctx, *key, strlen(*key)); ^ In file included from functions.h:11:0, from keys.c:12: blowfish.h:15:6: note: expected ‘unsigned char *’ but argument is of type ‘char *’ void Blowfish_Init(BLOWFISH_CTX *ctx, unsigned char *key, int keyLen); ^ gcc -O2 -Wall -c wrapbf.c wrapbf.c: In function ‘BFEncrypt’: wrapbf.c:31:24: warning: pointer targets in passing argument 2 of ‘Blowfish_Init’ differ in signedness [-Wpointer-sign] Blowfish_Init (&ctx, key, MAXKEYBYTES); ^ In file included from functions.h:11:0, from wrapbf.c:12: blowfish.h:15:6: note: expected ‘unsigned char *’ but argument is of type ‘char *’ void Blowfish_Init(BLOWFISH_CTX *ctx, unsigned char *key, int keyLen); ^ wrapbf.c: In function ‘BFDecrypt’: wrapbf.c:84:24: warning: pointer targets in passing argument 2 of ‘Blowfish_Init’ differ in signedness [-Wpointer-sign] Blowfish_Init (&ctx, mykey, MAXKEYBYTES); ^ In file included from functions.h:11:0, from wrapbf.c:12: blowfish.h:15:6: note: expected ‘unsigned char *’ but argument is of type ‘char *’ void Blowfish_Init(BLOWFISH_CTX *ctx, unsigned char *key, int keyLen); ^ gcc -O2 -Wall -c endian.c gcc -O2 -Wall -c wrapzl.c gcc -O2 -Wall -o bcrypt main.o blowfish.o rwfile.o keys.o wrapbf.o endian.o wrapzl.o -L/usr/local/lib -lz ``` |