cb424d7448
verify-patch-sanity.py validates every active recipe .patch has internally- consistent hunk line counts — catching the 'malformed patch at line N' failure at commit/CI/preflight time instead of hours into a cook. This cycle hit that class three times (qtwaylandscanner, sddm, xwayland), each only discovered when cookbook tried to apply the patch. Running it across the repo found 29 latent malformed patches (validated against GNU patch: e.g. relibc/P3-sysv-ipc reproduces 'malformed patch at line 22'). They were harmless only because they sit in vendored recipes (baked, not re- applied) — but would fail on any version-bump re-derivation. --fix recounts the hunk headers (body untouched) and repaired all 29. Wired into build-preflight.sh (Phase 1.0D) and redbear-ci.yml, with a unit test (test-patch-sanity.sh). Skips archived/legacy trees and unvalidatable formats (empty placeholders, bare-@@ git hunks).
81 lines
1.6 KiB
C++
81 lines
1.6 KiB
C++
// RUN: %clang_cc1 -emit-llvm %s -o - -triple i386-apple-macosx10.7.2
|
|
// PR1084
|
|
|
|
extern "C"
|
|
{
|
|
typedef unsigned char PRUint8;
|
|
typedef unsigned int PRUint32;
|
|
}
|
|
typedef PRUint32 nsresult;
|
|
struct nsID
|
|
{
|
|
};
|
|
typedef nsID nsIID;
|
|
class nsISupports
|
|
{
|
|
};
|
|
extern "C++"
|
|
{
|
|
template < class T > struct nsCOMTypeInfo
|
|
{
|
|
static const nsIID & GetIID ()
|
|
{
|
|
static const nsIID i = {};
|
|
return i;
|
|
}
|
|
};
|
|
}
|
|
|
|
class nsIDOMEvent:public nsISupports
|
|
{
|
|
};
|
|
class nsIDOMEventListener:public nsISupports
|
|
{
|
|
public:static const nsIID & GetIID ()
|
|
{
|
|
static const nsIID i = {};
|
|
return i;
|
|
}
|
|
virtual nsresult
|
|
__attribute__ ((regparm (0), cdecl)) HandleEvent (nsIDOMEvent * event) =
|
|
0;
|
|
};
|
|
class nsIDOMMouseListener:public nsIDOMEventListener
|
|
{
|
|
public:static const nsIID & GetIID ()
|
|
{
|
|
static const nsIID iid = {
|
|
};
|
|
return iid;
|
|
}
|
|
virtual nsresult
|
|
__attribute__ ((regparm (0),
|
|
cdecl)) MouseDown (nsIDOMEvent * aMouseEvent) = 0;
|
|
};
|
|
typedef
|
|
typeof (&nsIDOMEventListener::HandleEvent)
|
|
GenericHandler;
|
|
struct EventDispatchData
|
|
{
|
|
PRUint32 message;
|
|
GenericHandler method;
|
|
PRUint8 bits;
|
|
};
|
|
struct EventTypeData
|
|
{
|
|
const EventDispatchData *events;
|
|
int numEvents;
|
|
const nsIID *iid;
|
|
};
|
|
static const EventDispatchData sMouseEvents[] = {
|
|
{
|
|
(300 + 2),
|
|
reinterpret_cast < GenericHandler > (&nsIDOMMouseListener::MouseDown),
|
|
0x01}
|
|
};
|
|
static const EventTypeData sEventTypes[] = {
|
|
{
|
|
sMouseEvents, (sizeof (sMouseEvents) / sizeof (sMouseEvents[0])),
|
|
&nsCOMTypeInfo < nsIDOMMouseListener >::GetIID ()}
|
|
};
|