nspr.cfg: Added (limited) support for some macros from Netscape Portable Runtime (NSPR) library. Reference: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR

This commit is contained in:
orbitcowboy 2019-06-16 13:32:03 +02:00
parent 89a45c8f8a
commit 9d34ff6fb9
2 changed files with 34 additions and 0 deletions

33
cfg/nspr.cfg Normal file
View File

@ -0,0 +1,33 @@
<?xml version="1.0"?>
<def>
<define name="PR_EXPORT(__type)" value=""/>
<define name="PR_EXPORT_DATA(__type)" value=""/>
<define name="PR_IMPORT(__type)" value=""/>
<define name="PR_IMPORT_DATA(__type)" value=""/>
<define name="PR_EXTERN(__type)" value=""/>
<define name="PR_IMPLEMENT(__type)" value=""/>
<define name="PR_EXTERN_DATA(__type)" value=""/>
<define name="PR_IMPLEMENT_DATA(__type)" value=""/>
<define name="PR_STATIC_CALLBACK(__x)" value=""/>
<define name="PR_BIT(n)" value="((PRUint32)1 &lt;&lt; (n))"/>
<define name="PR_BITMASK(n)" value="(PR_BIT(n) - 1)"/>
<define name="PR_ROUNDUP(x,y)" value="((((x)+((y)-1))/(y))*(y))"/>
<define name="PR_MIN(x,y)" value="((x)&lt;(y)?(x):(y))"/>
<define name="PR_MAX(x,y)" value="((x)&gt;(y)?(x):(y))"/>
<define name="PR_ABS(x)" value="((x)&lt;0?-(x):(x))"/>
<define name="PR_ARRAY_SIZE(a)" value="(sizeof(a)/sizeof((a)[0]))"/>
<define name="PR_INT16_MAX" value="32767"/>
<define name="PR_INT16_MIN" value="(-32768)"/>
<define name="PR_UINT16_MAX" value="65535U"/>
<define name="PR_INT8_MAX" value="127"/>
<define name="PR_INT8_MIN" value="(-128)"/>
<define name="PR_UINT8_MAX" value="255U"/>
<podtype name="PRUint8" sign="u" size="1"/>
<podtype name="PRInt8" sign="s" size="1"/>
<podtype name="PRUint16" sign="u" size="2"/>
<podtype name="PRInt16" sign="s" size="2"/>
<podtype name="PRUint32" sign="u" size="4"/>
<podtype name="PRInt32" sign="s" size="4"/>
<podtype name="PRUint64" sign="u" size="8"/>
<podtype name="PRInt64" sign="s" size="8"/>
</def>

View File

@ -260,6 +260,7 @@ def scanPackage(workPath, cppcheckPath, jobs):
# 'libcerror': ['<libcerror.h>'], <- Enable after release of 1.88
'microsoft_sal': ['<sal.h>'],
'motif': ['<X11/', '<Xm/'],
# 'nspr': ['<prtypes.h>', '"prtypes.h"'], <- Enable after release of 1.88
# 'opengl': ['<GL/gl.h>', '<GL/glu.h>', '<GL/glut.h>'], <- Enable after release of 1.88
'python': ['<Python.h>', '"Python.h"'],
'qt': ['<QApplication>', '<QString>', '<QWidget>', '<QtWidgets>', '<QtGui'],