Christopher Faylor
2013-07-30 19:12:00 UTC
I'm starting a new thread. I'd like to keep the discussion confined to
what hooks we need to add to the DLL and other programming considerations.
I don't want to discuss what binaries get built for MSYS, where they
will go, or what the directory layout will look like. I just want to
try to add enough functionality to the Cygwin DLL so that a secondary
MSYS dll can provide the functionality that MSYS users expect.
I set up a "callout" branch in the Cygwin CVS repository which will
contain the changes that I'm proposing for this project. As I mentioned,
the intent is that an MSYS user will set the CYGWIN environment variable
keyword:
CYGWIN=preload:MSYS.DLL
Then the MSYS.dll will, as part of its dll entry function, call
cygwin_internal (CW_CALLOUT, msys_callin);
The cygwin_hook_function *could* look like:
#include <cygwin/callout.h>
extern "C" cw_callout_return_t
msys_callin (cw_callout_t code, ...)
{
va_arg arg;
cw_callout_t ret;
switch (code)
{
case CO_UNAME:
msys_uname_munge (va_arg (arg, struct utsname *));
ret = CO_R_KEEP_GOING;
break;
...
}
return ret;
}
I expect to check stuff into the branch later today (EST5EDT) when I'm
off the clock for my real job. I'll send out a notice when the branch
is actually populated with stuff. So far, I've only changed a few files
and I don't expect that many more will need to be modified.
cgf
what hooks we need to add to the DLL and other programming considerations.
I don't want to discuss what binaries get built for MSYS, where they
will go, or what the directory layout will look like. I just want to
try to add enough functionality to the Cygwin DLL so that a secondary
MSYS dll can provide the functionality that MSYS users expect.
I set up a "callout" branch in the Cygwin CVS repository which will
contain the changes that I'm proposing for this project. As I mentioned,
the intent is that an MSYS user will set the CYGWIN environment variable
keyword:
CYGWIN=preload:MSYS.DLL
Then the MSYS.dll will, as part of its dll entry function, call
cygwin_internal (CW_CALLOUT, msys_callin);
The cygwin_hook_function *could* look like:
#include <cygwin/callout.h>
extern "C" cw_callout_return_t
msys_callin (cw_callout_t code, ...)
{
va_arg arg;
cw_callout_t ret;
switch (code)
{
case CO_UNAME:
msys_uname_munge (va_arg (arg, struct utsname *));
ret = CO_R_KEEP_GOING;
break;
...
}
return ret;
}
I expect to check stuff into the branch later today (EST5EDT) when I'm
off the clock for my real job. I'll send out a notice when the branch
is actually populated with stuff. So far, I've only changed a few files
and I don't expect that many more will need to be modified.
cgf