Loading ...
Sorry, an error occurred while loading the content.

mingw32 accctrl.h and patch (was Re: Patch 6.0.116 Failure)

Expand Messages
  • Ron Aaron
    ... Thanks for the helpful solution. Attached is a patch to os_win32.c, and the missing accctrl.h file for mingw32 systems. Ron
    Message 1 of 16 , Jan 2, 2002
    • 0 Attachment
      Corinna Vinschen <vim-dev@...> writes:
      >On Tue, Jan 01, 2002 at 09:06:58PM -0500, Bill McCarthy wrote:
      >> Corrina,
      > s/rrin/rinn/
      >
      >> I just downloaded MinGW-1.1 (I think that's the latest release).
      >>
      >> There is no accctrl.h in that 10+ meg gz.
      >
      >*shrug* Contact the MingW mailing list and ask them about that
      >missing file in their Win32 headers.

      Thanks for the helpful solution.

      Attached is a patch to os_win32.c, and the missing 'accctrl.h' file for
      mingw32 systems.

      Ron
    • Bram Moolenaar
      ... Thanks. I ll include an alternate patch below. This avoids including the file when not using ACL. And it adds a hint to find the include file (I don t
      Message 2 of 16 , Jan 2, 2002
      • 0 Attachment
        Ron Aaron wrote:

        > Thanks for the helpful solution.
        >
        > Attached is a patch to os_win32.c, and the missing 'accctrl.h' file for
        > mingw32 systems.

        Thanks. I'll include an alternate patch below. This avoids including
        the file when not using ACL. And it adds a hint to find the include
        file (I don't want to include the accctrl.h file with Vim).

        *** ../../vim60.118/src/os_win32.c Tue Jan 1 21:13:14 2002
        --- os_win32.c Wed Jan 2 22:10:11 2002
        ***************
        *** 327,332 ****
        --- 327,338 ----

        #ifdef HAVE_ACL
        # include <aclapi.h>
        + # ifdef __MINGW32__
        + /* Unfortunately, accctrl.h is not in the mingw32 distribution, try
        + * getting it from a Cygwin distribution. Or look in the archive for the
        + * vimdev maillist (January 2002). */
        + # include "accctrl.h"
        + # endif
        /*
        * These are needed to dynamically load the ADVAPI DLL, which is not
        * implemented under Windows 95 (and causes VIM to crash)

        --
        Not too long ago, unzipping in public was illegal...

        /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
        ((( Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim )))
        \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
      • Corinna Vinschen
        ... Sorry but I m a bit irritated. Just having the file accctrl.h should be enough since aclapi.h actually includes accctrl.h already. Implicit including in
        Message 3 of 16 , Jan 3, 2002
        • 0 Attachment
          On Wed, Jan 02, 2002 at 11:18:24PM +0100, Bram Moolenaar wrote:
          >
          > Ron Aaron wrote:
          >
          > > Thanks for the helpful solution.
          > >
          > > Attached is a patch to os_win32.c, and the missing 'accctrl.h' file for
          > > mingw32 systems.
          >
          > Thanks. I'll include an alternate patch below. This avoids including
          > the file when not using ACL. And it adds a hint to find the include
          > file (I don't want to include the accctrl.h file with Vim).

          Sorry but I'm a bit irritated. Just having the file accctrl.h should
          be enough since aclapi.h actually includes accctrl.h already. Implicit
          including in the source should be unnecessary.

          Corinna

          >
          > *** ../../vim60.118/src/os_win32.c Tue Jan 1 21:13:14 2002
          > --- os_win32.c Wed Jan 2 22:10:11 2002
          > ***************
          > *** 327,332 ****
          > --- 327,338 ----
          >
          > #ifdef HAVE_ACL
          > # include <aclapi.h>
          > + # ifdef __MINGW32__
          > + /* Unfortunately, accctrl.h is not in the mingw32 distribution, try
          > + * getting it from a Cygwin distribution. Or look in the archive for the
          > + * vimdev maillist (January 2002). */
          > + # include "accctrl.h"
          > + # endif
          > /*
          > * These are needed to dynamically load the ADVAPI DLL, which is not
          > * implemented under Windows 95 (and causes VIM to crash)
          >
          > --
          > Not too long ago, unzipping in public was illegal...
          >
          > /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
          > ((( Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim )))
          > \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///

          --
          Corinna Vinschen
          Cygwin Developer
          Red Hat, Inc.
          mailto:vinschen@...
        • Bram Moolenaar
          ... I don t understand this (and I don t have the files to look in them). As I heard it, mingw32 does not complain about a missing include file, but it does
          Message 4 of 16 , Jan 3, 2002
          • 0 Attachment
            Corinna Vinschen wrote:

            > > Thanks. I'll include an alternate patch below. This avoids including
            > > the file when not using ACL. And it adds a hint to find the include
            > > file (I don't want to include the accctrl.h file with Vim).
            >
            > Sorry but I'm a bit irritated. Just having the file accctrl.h should
            > be enough since aclapi.h actually includes accctrl.h already. Implicit
            > including in the source should be unnecessary.

            I don't understand this (and I don't have the files to look in them).
            As I heard it, mingw32 does not complain about a missing include file,
            but it does complain about TRUSTEE not being defined. How can it
            suddenly include accctrl.h just because it's present?

            --
            GUARD #2: It could be carried by an African swallow!
            GUARD #1: Oh, yeah, an African swallow maybe, but not a European swallow,
            that's my point.
            GUARD #2: Oh, yeah, I agree with that...
            The Quest for the Holy Grail (Monty Python)

            /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
            ((( Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim )))
            \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
          • Bill McCarthy
            ... Thanks for the patch. I used it and added the missing accctrl.h to my src directory. I still get the same error messages wrt TRUSTEE. However, Ron s
            Message 5 of 16 , Jan 3, 2002
            • 0 Attachment
              On Wed, January 02, 2002 5:18 PM, Bram Moolenaar wrote:

              > Ron Aaron wrote:

              >>Thanks for the helpful solution.
              >>
              >>Attached is a patch to os_win32.c, and the missing 'accctrl.h' file for
              >>mingw32 systems.
              >
              >Thanks. I'll include an alternate patch below. This avoids including
              >the file when not using ACL. And it adds a hint to find the include
              >file (I don't want to include the accctrl.h file with Vim).

              Thanks for the patch. I used it and added the missing
              accctrl.h to my src directory. I still get the same error
              messages wrt TRUSTEE.

              However, Ron's patch works just fine!

              Bill
            • Bram Moolenaar
              ... Strange. Why did this happen? Must accctrl.h be included before aclapi.h perhaps? -- Vim is like Emacs without all the typing. (John Johann Spetz) ///
              Message 6 of 16 , Jan 3, 2002
              • 0 Attachment
                Bill McCarthy wrote:

                > > Ron Aaron wrote:
                >
                > >>Thanks for the helpful solution.
                > >>
                > >>Attached is a patch to os_win32.c, and the missing 'accctrl.h' file for
                > >>mingw32 systems.
                > >
                > >Thanks. I'll include an alternate patch below. This avoids including
                > >the file when not using ACL. And it adds a hint to find the include
                > >file (I don't want to include the accctrl.h file with Vim).
                >
                > Thanks for the patch. I used it and added the missing
                > accctrl.h to my src directory. I still get the same error
                > messages wrt TRUSTEE.
                >
                > However, Ron's patch works just fine!

                Strange. Why did this happen? Must accctrl.h be included before
                aclapi.h perhaps?

                --
                Vim is like Emacs without all the typing. (John "Johann" Spetz)

                /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
                ((( Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim )))
                \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
              • Madoka Machitani
                Quoting from os_win32.h: #if !defined(__MINGW32__) && !defined(__CYGWIN__) && (!defined(__BORLANDC__) || __BORLANDC__ = 0x550) && (!defined(_MSC_VER) ||
                Message 7 of 16 , Jan 4, 2002
                • 0 Attachment
                  Quoting from os_win32.h:

                  #if !defined(__MINGW32__) \
                  && !defined(__CYGWIN__) \
                  && (!defined(__BORLANDC__) || __BORLANDC__ >= 0x550) \
                  && (!defined(_MSC_VER) || _MSC_VER > 1010)
                  /*
                  * Access Control List (actually security info).
                  * Mingw and Cygwin don't have the acl stuff.
                  * Borland only in version 5.5 and later.
                  */
                  # define HAVE_ACL
                  #endif

                  As you see, HAVE_ACL is not defined when compiled under Mingw or Cygwin.
                  Ron's patch works since it includes accctrl.h outside of the `#ifdef
                  HAVE_ACL' statement.

                  --
                  Madoka Machitani <madokam@...>
                • Bram Moolenaar
                  ... Thanks for pointing this out. The actual problem wasn t missing a header file, but using TRUSTEE when it shouldn t. Try this patch instead (after patch
                  Message 8 of 16 , Jan 5, 2002
                  • 0 Attachment
                    Madoka Machitani wrote:

                    > Quoting from os_win32.h:
                    >
                    > #if !defined(__MINGW32__) \
                    > && !defined(__CYGWIN__) \
                    > && (!defined(__BORLANDC__) || __BORLANDC__ >= 0x550) \
                    > && (!defined(_MSC_VER) || _MSC_VER > 1010)
                    > /*
                    > * Access Control List (actually security info).
                    > * Mingw and Cygwin don't have the acl stuff.
                    > * Borland only in version 5.5 and later.
                    > */
                    > # define HAVE_ACL
                    > #endif
                    >
                    > As you see, HAVE_ACL is not defined when compiled under Mingw or Cygwin.
                    > Ron's patch works since it includes accctrl.h outside of the `#ifdef
                    > HAVE_ACL' statement.

                    Thanks for pointing this out. The actual problem wasn't missing a
                    header file, but using TRUSTEE when it shouldn't. Try this patch
                    instead (after patch 6.0.116 and without the previous "fixes"):

                    *** ../../vim60.118/src/os_win32.c Tue Jan 1 21:13:14 2002
                    --- os_win32.c Sat Jan 5 13:29:06 2002
                    ***************
                    *** 4058,4064 ****
                    --- 4058,4066 ----
                    BOOL aclDefault;
                    HANDLE hToken;
                    DWORD bytes;
                    + #ifdef HAVE_ACL
                    TRUSTEE t;
                    + #endif
                    ACCESS_MASK am;
                    ACCESS_MASK cm;
                    PACL pacl;

                    --
                    FATHER: You killed eight wedding guests in all!
                    LAUNCELOT: Er, Well ... the thing is ... I thought your son was a lady.
                    FATHER: I can understand that.
                    "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

                    /// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
                    ((( Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim )))
                    \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
                  • Bill McCarthy
                    ... Thanks for spotting this Madoka and thanks for the patch Bram. The acccctrl.h file is no longer needed and the patch works fine. Please make an official
                    Message 9 of 16 , Jan 8, 2002
                    • 0 Attachment
                      Bram Moolenaar worte:
                      >
                      > Madoka Machitani wrote:
                      >
                      > > Quoting from os_win32.h:
                      > >
                      > > #if !defined(__MINGW32__) \
                      > > && !defined(__CYGWIN__) \
                      > > && (!defined(__BORLANDC__) || __BORLANDC__ >= 0x550) \
                      > > && (!defined(_MSC_VER) || _MSC_VER > 1010)
                      > > /*
                      > > * Access Control List (actually security info).
                      > > * Mingw and Cygwin don't have the acl stuff.
                      > > * Borland only in version 5.5 and later.
                      > > */
                      > > # define HAVE_ACL
                      > > #endif
                      > >
                      > > As you see, HAVE_ACL is not defined when compiled under Mingw or
                      > > Cygwin. Ron's patch works since it includes accctrl.h outside of
                      > > the `#ifdef HAVE_ACL' statement.
                      >
                      > Thanks for pointing this out. The actual problem wasn't missing a
                      > header file, but using TRUSTEE when it shouldn't. Try this patch
                      > instead (after patch 6.0.116 and without the previous "fixes"):
                      >
                      > *** ../../vim60.118/src/os_win32.c Tue Jan 1 21:13:14 2002
                      > --- os_win32.c Sat Jan 5 13:29:06 2002
                      > ***************
                      > *** 4058,4064 ****
                      > --- 4058,4066 ----
                      > BOOL aclDefault;
                      > HANDLE hToken;
                      > DWORD bytes;
                      > + #ifdef HAVE_ACL
                      > TRUSTEE t;
                      > + #endif
                      > ACCESS_MASK am;
                      > ACCESS_MASK cm;
                      > PACL pacl;
                      >

                      Thanks for spotting this Madoka and thanks for the patch Bram.

                      The acccctrl.h file is no longer needed and the patch works fine.
                      Please make an "official" patch - particularly important to those of
                      us using CVS - I've written a special MakeFile for the interim.

                      BTW, patches 119 and 120 haven't make it to CVS yet.

                      Regards,
                      Bill
                    Your message has been successfully submitted and would be delivered to recipients shortly.