Simon Marlow | 3 Apr 2008 18:42
Picon

patch applied (packages/base): fix types for __hscore_st_dev() and __hscore_st_ino()

Wed Mar 19 10:41:01 PDT 2008  Simon Marlow <simonmarhaskell <at> gmail.com>
  * fix types for __hscore_st_dev() and __hscore_st_ino()

    M ./include/HsBase.h -2 +2
Ian Lynagh | 5 Apr 2008 00:17
Picon
Gravatar

patch applied (ghc-6.8/packages/base): List extensions used rather than using the -fglasgow-exts hammer

Sat Mar 22 06:36:22 PDT 2008  Ian Lynagh <igloo <at> earth.li>
  * List extensions used rather than using the -fglasgow-exts hammer

    M ./base.cabal -3 +8
Ian Lynagh | 5 Apr 2008 00:17
Picon
Gravatar

patch applied (ghc-6.8/packages/base): fix types for __hscore_st_dev() and __hscore_st_ino()

Wed Mar 19 10:41:01 PDT 2008  Simon Marlow <simonmarhaskell <at> gmail.com>
  * fix types for __hscore_st_dev() and __hscore_st_ino()

    M ./include/HsBase.h -2 +2
Ian Lynagh | 5 Apr 2008 00:17
Picon
Gravatar

patch applied (ghc-6.8/packages/base): Remove a gratuitous pattern type sig

Thu Mar 20 18:13:56 PDT 2008  Ian Lynagh <igloo <at> earth.li>
  * Remove a gratuitous pattern type sig

    M ./GHC/IO.hs -1 +1
Don Stewart | 6 Apr 2008 05:49
Picon
Picon
Favicon
Gravatar

patch applied (bytestring): tweaks

Thu Mar 20 17:59:40 PDT 2008  Don Stewart <dons <at> galois.com>
  * tweaks

    M ./tests/Makefile -1 +1
    M ./tests/QuickCheckUtils.hs -1 +1
Don Stewart | 6 Apr 2008 05:49
Picon
Picon
Favicon
Gravatar

patch applied (bytestring): normalise rewrite rule names

Fri Mar 21 09:53:26 PDT 2008  Don Stewart <dons <at> galois.com>
  * normalise rewrite rule names

    M ./Data/ByteString/Lazy.hs -10 +4
    M ./Data/ByteString/Lazy/Char8.hs -4
Don Stewart | 6 Apr 2008 05:49
Picon
Picon
Favicon
Gravatar

patch applied (bytestring): document second argument of hGet

Sat Apr  5 20:45:54 PDT 2008  Don Stewart <dons <at> galois.com>
  * document second argument of hGet

    M ./Data/ByteString.hs -1 +2
Ian Lynagh | 6 Apr 2008 22:55
Picon
Gravatar

patch applied (packages/Win32): malloc a big enough buffer for the registry functions. Fixes trac #2097.

Sun Apr  6 13:50:51 PDT 2008  Ian Lynagh <igloo <at> earth.li>
  * malloc a big enough buffer for the registry functions. Fixes trac #2097.
  We were mallocing a byte per tchar, but tchars are normally 2 bytes big...
  I think they are at most 4 bytes, so we now malloc 4 * #tchars. Not sure
  if there is a proper function I should be using for this?

    M ./System/Win32/Registry.hsc -3 +8

View patch online:
http://darcs.haskell.org/packages/Win32/_darcs/patches/20080406205051-3fd76-d3fffd698c393dd56334cab6ab4697b696b67ed3.gz
Neil Mitchell | 6 Apr 2008 23:08
Picon
Gravatar

Re: patch applied (packages/Win32): malloc a big enough buffer for the registry functions. Fixes trac #2097.

Hi Ian,

>   We were mallocing a byte per tchar, but tchars are normally 2 bytes big...
>   I think they are at most 4 bytes, so we now malloc 4 * #tchars. Not sure
>   if there is a proper function I should be using for this?

TCHAR is #ifdef'd to be either CHAR on Win 9x/ME (1 byte), or WCHAR on
Win 2k/XP/Vista (2 bytes). In C you'd just do sizeof(TCHAR), not sure
if there is a way of doing this from Haskell. Remember that you may
wish to malloc 2*(#tchars+1) since the Registry has rather weird
semantics if it can't fit in a trailing zero - in some cases it
doesn't null terminate the string, because it runs out of space, but
still returns success. I think also it wants you to tell it the size
of the buffer minus the space it might need for the trailing zero -
not the size of the buffer.

Thanks

Neil
Ross Paterson | 7 Apr 2008 09:48
Picon
Favicon

Re: patch applied (packages/Win32): malloc a big enough buffer for the registry functions. Fixes trac #2097.

On Sun, Apr 06, 2008 at 10:08:41PM +0100, Neil Mitchell wrote:
> >   We were mallocing a byte per tchar, but tchars are normally 2 bytes big...
> >   I think they are at most 4 bytes, so we now malloc 4 * #tchars. Not sure
> >   if there is a proper function I should be using for this?
> 
> TCHAR is #ifdef'd to be either CHAR on Win 9x/ME (1 byte), or WCHAR on
> Win 2k/XP/Vista (2 bytes). In C you'd just do sizeof(TCHAR), not sure
> if there is a way of doing this from Haskell.

Well there's sizeof (undefined :: TCHAR).  Where the pointer has type
LPTSTR = Ptr TCHAR, mallocArray will do it.  (Actually allocaArray seems
like a better choice in this context.)

Gmane