Hi, When trying to compile base64.c using g++ I got the following compilation problems:
$ g++ -c base64.c base64.c:44:20: error: config.h: No such file or directory base64.h:34: error: expected ',' or '...' before 'in' base64.h:39: error: expected ',' or '...' before 'in' base64.c:67: error: expected ',' or '...' before 'in' base64.c: In function 'void base64_encode(const char*)': base64.c:71: error: initializer-string for array of chars is too long base64.c:73: error: 'inlen' was not declared in this scope base64.c:73: error: 'outlen' was not declared in this scope base64.c:75: error: 'out' was not declared in this scope base64.c:75: error: 'in' was not declared in this scope base64.c:100: error: 'outlen' was not declared in this scope base64.c:101: error: 'out' was not declared in this scope base64.c: In function 'size_t base64_encode_alloc(const char*, size_t, char**)': base64.c:136: error: invalid conversion from 'void*' to 'char*' base64.c:68: error: too many arguments to function 'void base64_encode(const char*)' base64.c:140: error: at this point in file base64.c: At global scope: base64.c:313: error: expected ',' or '...' before 'in' base64.c: In function 'bool base64_decode(const char*)': base64.c:316: error: 'outlen' was not declared in this scope base64.c:318: error: 'inlen' was not declared in this scope base64.c:320: error: 'in' was not declared in this scope base64.c:325: error: 'out' was not declared in this scope base64.c:325: error: 'in' was not declared in this scope base64.c:333: error: 'in' was not declared in this scope base64.c:349: error: 'out' was not declared in this scope base64.c:369: error: 'out' was not declared in this scope base64.c:376: error: 'in' was not declared in this scope base64.c:382: error: 'inlen' was not declared in this scope base64.c: In function 'bool base64_decode_alloc(const char*, size_t, char**, size_t*)': base64.c:410: error: invalid conversion from 'void*' to 'char*' base64.c:314: error: too many arguments to function 'bool base64_decode(const char*)' base64.c:414: error: at this point in file I've made some changes that seem to fix those errors, you can find the patches attached to my message. The error about config.h is my fault as I don't have one, but the other error don't seem to be related to this. If I missed something, and these errors are my fault of misconfiguration, I would really appreciate any clue for what I did wrong. I'm using gcc 4.1.2 on Gentoo. It may well be I hope the patches will be useful. Best regards, Guy N.B. I'm not subscribed to this list, so please cc back to my email your reply. Where can I find an email archive of this list?
base64.c.patch
Description: Binary data
base64.h.patch
Description: Binary data