widl: Make headers guards compatible with midl.

This commit is contained in:
Jacek Caban 2012-03-08 14:52:21 +01:00 committed by Alexandre Julliard
parent af2eba24b7
commit 718adc91fc
6 changed files with 6 additions and 21 deletions

View File

@ -19,9 +19,6 @@
* *
*/ */
cpp_quote("#ifndef __audioclient_h__")
cpp_quote("#define __audioclient_h__")
import "wtypes.idl"; import "wtypes.idl";
import "unknwn.idl"; import "unknwn.idl";
import "audiosessiontypes.h"; import "audiosessiontypes.h";
@ -322,5 +319,3 @@ cpp_quote("#define AUDCLNT_E_INVALID_DEVICE_PERIOD AUDCLNT_ERR(0x20)")
cpp_quote("#define AUDCLNT_S_BUFFER_EMPTY AUDCLNT_SUCCESS(0x1)") cpp_quote("#define AUDCLNT_S_BUFFER_EMPTY AUDCLNT_SUCCESS(0x1)")
cpp_quote("#define AUDCLNT_S_THREAD_ALREADY_REGISTERED AUDCLNT_SUCCESS(0x2)") cpp_quote("#define AUDCLNT_S_THREAD_ALREADY_REGISTERED AUDCLNT_SUCCESS(0x2)")
cpp_quote("#define AUDCLNT_S_POSITION_STALLED AUDCLNT_SUCCESS(0x3)") cpp_quote("#define AUDCLNT_S_POSITION_STALLED AUDCLNT_SUCCESS(0x3)")
cpp_quote("#endif /*__audioclient_h__*/")

View File

@ -19,9 +19,6 @@
* *
*/ */
cpp_quote("#ifndef __audiopolicy_h__")
cpp_quote("#define __audiopolicy_h__")
import "oaidl.idl"; import "oaidl.idl";
import "ocidl.idl"; import "ocidl.idl";
import "propidl.idl"; import "propidl.idl";
@ -241,5 +238,3 @@ interface IAudioSessionManager2 : IAudioSessionManager
[in] IAudioVolumeDuckNotification *duckNotification [in] IAudioVolumeDuckNotification *duckNotification
); );
}; };
cpp_quote("#endif /*__audiopolicy_h__*/")

View File

@ -19,9 +19,6 @@
* *
*/ */
cpp_quote("#ifndef __devicetopology_h__")
cpp_quote("#define __devicetopology_h__")
interface IPart; interface IPart;
interface IControlInterface; interface IControlInterface;
interface IDeviceTopology; interface IDeviceTopology;
@ -737,5 +734,3 @@ library DevTopologyLib
interface IDeviceTopology; interface IDeviceTopology;
} }
} }
cpp_quote("#endif /*__devicetopology_h__*/")

View File

@ -435,7 +435,7 @@ typedef enum tagHH_GPROPID {
HH_GPROPID_CONTENT_LANGUAGE = 5 HH_GPROPID_CONTENT_LANGUAGE = 5
} HH_GPROPID; } HH_GPROPID;
#ifdef __WIDL_OAIDL_H #ifdef __oaidl_h__
typedef struct tagHH_GLOBAL_PROPERTY typedef struct tagHH_GLOBAL_PROPERTY
{ {
@ -443,7 +443,7 @@ typedef struct tagHH_GLOBAL_PROPERTY
VARIANT var; VARIANT var;
} HH_GLOBAL_PROPERTY ; } HH_GLOBAL_PROPERTY ;
#endif /* __WIDL_OAIDL_H */ #endif /* __oaidl_h__ */
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -1371,8 +1371,8 @@ void write_header(const statement_list_t *stmts)
fprintf(header, "#include <ole2.h>\n"); fprintf(header, "#include <ole2.h>\n");
fprintf(header, "#endif\n\n"); fprintf(header, "#endif\n\n");
fprintf(header, "#ifndef __WIDL_%s\n", header_token); fprintf(header, "#ifndef __%s__\n", header_token);
fprintf(header, "#define __WIDL_%s\n\n", header_token); fprintf(header, "#define __%s__\n\n", header_token);
fprintf(header, "/* Forward declarations */\n\n"); fprintf(header, "/* Forward declarations */\n\n");
write_forward_decls(header, stmts); write_forward_decls(header, stmts);
@ -1394,7 +1394,7 @@ void write_header(const statement_list_t *stmts)
fprintf(header, "\n"); fprintf(header, "\n");
end_cplusplus_guard(header); end_cplusplus_guard(header);
fprintf(header, "#endif /* __WIDL_%s */\n", header_token); fprintf(header, "#endif /* __%s__ */\n", header_token);
fclose(header); fclose(header);
} }

View File

@ -197,7 +197,7 @@ static char *make_token(const char *name)
token = xstrdup(name); token = xstrdup(name);
for (i=0; token[i]; i++) { for (i=0; token[i]; i++) {
if (!isalnum(token[i])) token[i] = '_'; if (!isalnum(token[i])) token[i] = '_';
else token[i] = toupper(token[i]); else token[i] = tolower(token[i]);
} }
return token; return token;
} }