Turn off optimizations for prprf.c on OS/2 to avoid PR_snprintf problem. NSPRPUB_PRE_4_2_CLIENT_BRANCH MOZILLA_1_4a_RELEASE
authorseawood%netscape.com
Tue, 01 Apr 2003 04:05:59 +0000
branchNSPRPUB_PRE_4_2_CLIENT_BRANCH
changeset 2778 d9d8c7a976921269df39ce807866cd43a08ade26
parent 2770 e55313eab4c911b3a5b615db8ca3c8a27e329e47
child 2780 ab3a713a09dd39449bc88f7f5e84f8707e58494d
push idunknown
push userunknown
push dateunknown
bugs199901
Turn off optimizations for prprf.c on OS/2 to avoid PR_snprintf problem. Thanks to Michael Kaply <mkaply@us.ibm.com> for the patch. Bug #199901 r=wtc a=asa
pr/src/io/Makefile.in
--- a/pr/src/io/Makefile.in
+++ b/pr/src/io/Makefile.in
@@ -76,10 +76,18 @@ endif
 TARGETS	= $(OBJS)
 
 INCLUDES = -I$(dist_includedir) -I$(topsrcdir)/pr/include -I$(topsrcdir)/pr/include/private
 
 DEFINES	+= -D_NSPR_BUILD_
 
 include $(topsrcdir)/config/rules.mk
 
+# An OS/2 Optimization bug causes PR_snprintf() to produce wrong result.
+# This suppresses optimization for this single compilation unit.
+ifeq ($(MOZ_OS2_TOOLS),VACPP)
+$(OBJDIR)/prprf.obj: prprf.c
+	@$(MAKE_OBJDIR)
+	$(CC) -Fo$@ -c $(filter-out /O+, $(CFLAGS)) $<
+endif
+
 export:: $(TARGETS)