Crypt::Rijndael now uses <sys/types.h>

brian_d_foy on 2006-11-12T16:46:33

I've released Crypt-Rijndael-0.06_01 to see if the simple change of using <sys/type.h> solves most of the bugs in RT. In trying to test this, I've discovered that everything in my life is now some sort of BSD. I used to have linux logins, and I guess I should pul that Windows box out of the closet, but I'll wait to see what CPAN Testers say.


Uses what?

Ovid on 2006-11-12T16:58:10

In looking at the entry, I see you don't state what it uses. Further, in viewing source, where you would have stated what it uses, I see that it has two blank spaces instead of one, implying that some programmatic transformation took place (or just some very weird typo).

Re:Uses what?

Aristotle on 2006-11-12T19:37:59

Looks fine to me, though it might just be that brian got to it before I got here.

Re:Uses what?

Ovid on 2006-11-12T19:47:28

Interesting. It looks fine to me now, too. However, that doesn't how <sys/type.h> disappeared when I viewed source. Weird.

Re:Uses what?

brian_d_foy on 2006-11-12T20:53:12

I just got there before I saw Ovid's comment. The angle brackets look like HTML so the Slash either removed them when it stored it or displayed it. They where there when I edited it but not when it showed up. Whatever. :)

Re:Uses what?

Aristotle on 2006-11-12T21:22:09

Ah, yeah, of course. The HTML tag filter doesn’t mangle user input, it just scrubs posts during rendering.

You, sir, are my hero.

jesse on 2006-11-12T20:28:26

Now builds and tests clean on x86-64 linux.

Remind me to buy you a beer next time we're in the same place.

Win32 a nogo

renodino on 2006-11-12T22:02:52

(AS 5.8.6, XP SP2, VS.NET2K3)

Doesn't build on Win32; but after I hacked the UINT32/UINT8 typedefs back to the 0.05 original, it built (w/ a few warnings):

/*
typedef __uint32_t UINT32;
typedef __uint8_t UINT8;
*/

typedef unsigned long UINT32;
typedef unsigned char UINT8;
Lemme know if you want an RT ticket on it.

Re:Win32 a nogo

brian_d_foy on 2006-11-12T22:08:20

I think there is already an RT ticket for this, but it uses cygwin, so was hoping it would all work out.

I'm not much of a Windows programmer, but is there another header that's equivalent to types.h? If not, what's the best way to do an #ifdef to detect windows? Pointing me at a module that does it right is fine as long as I can see an example.

Thanks, :)

Re:Win32 a nogo

renodino on 2006-11-12T22:31:26

Win32 does have a sys/types.h (that part compiles OK), just no __uint32_t/__uint8_t.

A quick scan of perl-5.8.8 srcs shows WIN32 (and occassionally _WIN32) are the defines used. IIRC, thats defined by VC by default. In fact, when applied to rijndael.h, this works:

#ifdef WIN32
typedef unsigned long UINT32;
typedef unsigned char UINT8;
#else
typedef __uint32_t UINT32;
typedef __uint8_t UINT8;
#endif

Re:Win32 a nogo

brian_d_foy on 2006-11-13T14:03:17

Yeah, I figured that out right after I posted that. I did that for Crypt-Rijndael-0.06_02 which I uploaded last night.