Skip to content

Commit c3dc0a1

Browse files
committed
Update MXML version to 2.10
1 parent 548e552 commit c3dc0a1

File tree

5 files changed

+649
-602
lines changed

5 files changed

+649
-602
lines changed

ProcessHacker/mxml/config.h

Lines changed: 9 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,6 @@
1414
* http://www.msweet.org/projects.php/Mini-XML
1515
*/
1616

17-
/*
18-
* Beginning with VC2005, Microsoft breaks ISO C and POSIX conformance
19-
* by deprecating a number of functions in the name of security, even
20-
* when many of the affected functions are otherwise completely secure.
21-
* The _CRT_SECURE_NO_DEPRECATE definition ensures that we won't get
22-
* warnings from their use...
23-
*
24-
* Then Microsoft decided that they should ignore this in VC2008 and use
25-
* yet another define (_CRT_SECURE_NO_WARNINGS) instead. Bastards.
26-
*/
27-
28-
#define _CRT_SECURE_NO_DEPRECATE
29-
#define _CRT_SECURE_NO_WARNINGS
30-
31-
3217
/*
3318
* Include necessary headers...
3419
*/
@@ -38,40 +23,20 @@
3823
#include <string.h>
3924
#include <stdarg.h>
4025
#include <ctype.h>
41-
#include <io.h>
42-
43-
44-
/*
45-
* Microsoft also renames the POSIX functions to _name, and introduces
46-
* a broken compatibility layer using the original names. As a result,
47-
* random crashes can occur when, for example, strdup() allocates memory
48-
* from a different heap than used by malloc() and free().
49-
*
50-
* To avoid moronic problems like this, we #define the POSIX function
51-
* names to the corresponding non-standard Microsoft names.
52-
*/
53-
54-
#define close _close
55-
#define open _open
56-
#define read _read
57-
#define snprintf _snprintf
58-
#define strdup _strdup
59-
#define vsnprintf _vsnprintf
60-
#define write _write
6126

6227

6328
/*
6429
* Version number...
6530
*/
6631

67-
#define MXML_VERSION "Mini-XML v2.8"
32+
#define MXML_VERSION "Mini-XML v2.10"
6833

6934

7035
/*
7136
* Inline function support...
7237
*/
7338

74-
#define inline _inline
39+
#define inline __inline
7540

7641

7742
/*
@@ -96,6 +61,13 @@
9661
#define HAVE_STRDUP 1
9762

9863

64+
/*
65+
* Do we have threading support?
66+
*/
67+
68+
#undef HAVE_PTHREAD_H
69+
70+
9971
/*
10072
* Define prototypes for string functions as needed...
10173
*/

ProcessHacker/mxml/mxml-attr.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ mxmlElementDeleteAttr(mxml_node_t *node,/* I - Element */
6666
i --, attr ++)
6767
{
6868
#ifdef DEBUG
69-
fprintf(stderr, " %s=\"%s\"\n", attr->name, attr->value);
69+
printf(" %s=\"%s\"\n", attr->name, attr->value);
7070
#endif /* DEBUG */
7171

7272
if (!strcmp(attr->name, name))
@@ -128,13 +128,13 @@ mxmlElementGetAttr(mxml_node_t *node, /* I - Element node */
128128
i --, attr ++)
129129
{
130130
#ifdef DEBUG
131-
fprintf(stderr, " %s=\"%s\"\n", attr->name, attr->value);
131+
printf(" %s=\"%s\"\n", attr->name, attr->value);
132132
#endif /* DEBUG */
133133

134134
if (!strcmp(attr->name, name))
135135
{
136136
#ifdef DEBUG
137-
fprintf(stderr, " Returning \"%s\"!\n", attr->value);
137+
printf(" Returning \"%s\"!\n", attr->value);
138138
#endif /* DEBUG */
139139
return (attr->value);
140140
}
@@ -145,7 +145,7 @@ mxmlElementGetAttr(mxml_node_t *node, /* I - Element node */
145145
*/
146146

147147
#ifdef DEBUG
148-
fputs(" Returning NULL!\n", stderr);
148+
puts(" Returning NULL!\n");
149149
#endif /* DEBUG */
150150

151151
return (NULL);

0 commit comments

Comments
 (0)