This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] windres (ungarbled): (6) always define _WIN32


_WIN32 is always defined in MS rc.exe, like RC_INVOKED. It 
means !_MAC. windres can use another preprocessor command 
without this define if needed. 

ChangeLog:

2002-03-19 Gunnar Degnbol <degnbol@danbbs.dk>

	* resrc.c: Always define _WIN32

win32.rc:

101 DIALOG DISCARDABLE  0, 0, 186, 95
#ifdef _WIN32
CAPTION "Win32"
#endif
BEGIN
    DEFPUSHBUTTON "OK",1,129,7,50,14
END

Before patch:

$ /bin/windres.exe -i win32.rc 
LANGUAGE 0, 0

101 DIALOG MOVEABLE DISCARDABLE 0, 0, 186, 95
STYLE 0x80880000
BEGIN
  DEFPUSHBUTTON "OK", 1, 129, 7, 50, 14, 0x50010001
END

After patch:

$ windres.exe -i win32.rc 
LANGUAGE 9, 1

101 DIALOG MOVEABLE DISCARDABLE 0, 0, 186, 95
STYLE 0x80c80000
CAPTION "Win32"
BEGIN
  DEFPUSHBUTTON "OK", 1, 129, 7, 50, 14, 0x50010001
END

win32.patch:
--- binutils/resrc.c	Sun Mar 17 14:50:59 2002
+++ binutils.new/resrc.c	Sun Mar 17 14:51:05 2002
@@ -78,7 +78,7 @@
 
 /* The default preprocessor.  */
 
-#define DEFAULT_PREPROCESSOR "gcc -E -xc -DRC_INVOKED"
+#define DEFAULT_PREPROCESSOR "gcc -E -xc -DRC_INVOKED -D_WIN32"
 
 /* We read the directory entries in a cursor or icon file into
    instances of this structure.  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]