Dave and Natalie wrote:
> 
> >Also, make sure the _PR_MD_ATOMIC_ block with the pseudo-asm at the end
> >of nsprpub/pr/src/md/os2/os2misc.c is #if 0'd out.
> 
> Hi Henry, thanx for the trail map. Just wondering what exactly you mean here? If I 
>comment the block out I get unresolved symbols errors.

I was hoping that wouldn't happen because then it gets a bit tricker.
Posting patches is problematic right now because my code has other
experimental blocks that I don't want to propagate. But it's not all
that hard to fix manually.

1) In both the root and nsprpub configure.in's, move the ASM_SUFFIX=asm
statements to the VACPP blocks, and add ASM_SUFFIX=s to the EMX blocks.

2) In nsprpub's configure.in, add:

ASFLAGS="$(CFLAGS)"
PR_MD_ASFILES=os2emx.s

to the EMX block, and

PR_MD_ASFILES=os2vacpp.asm

to the VACPP.

3) Fix the block around line 300 of nsprpub/pr/include/md/_os2.h to
read:

#ifdef XP_OS2_EMX
#define _MD_INIT_ATOMIC()
extern PRInt32 _PR_x86_AtomicIncrement(PRInt32 *val);
#define _MD_ATOMIC_INCREMENT          PR_x86_AtomicIncrement
extern PRInt32 _PR_x86_AtomicDecrement(PRInt32 *val);
#define _MD_ATOMIC_DECREMENT          PR_x86_AtomicDecrement
extern PRInt32 _PR_x86_AtomicAdd(PRInt32 *ptr, PRInt32 val);
#define _MD_ATOMIC_ADD                PR_x86_AtomicAdd
extern PRInt32 _PR_x86_AtomicSet(PRInt32 *val, PRInt32 newval);
#define _MD_ATOMIC_SET                PR_x86_AtomicSet
#else
#define _MD_INIT_ATOMIC               _PR_MD_INIT_ATOMIC
#define _MD_ATOMIC_INCREMENT(x)       _PR_MD_ATOMIC_INCREMENT(x)
#define _MD_ATOMIC_ADD(x,y)                       _PR_MD_ATOMIC_ADD(x,y)
#define _MD_ATOMIC_DECREMENT(x)       _PR_MD_ATOMIC_DECREMENT(x)
#define _MD_ATOMIC_SET(x,y)           _PR_MD_ATOMIC_SET(x, y)
#endif

4) In nsprpub/pr/src/md/os2/Makefile.in, change:

ifeq ($(MOZ_OS2_TOOLS),VACPP)
ASFILES = os2vacpp.asm
endif

to

ASFILES = $(PR_MD_ASFILES)

5) In nsprpub/pr/sr/md/os2/objs.mk, delete

ifeq ($(MOZ_OS2_TOOLS),VACPP)
ASFILES = os2vacpp.asm
endif

and change:

OBJS += $(addprefix md/os2/$(OBJDIR)/,$(CSRCS:.c=.$(OBJ_SUFFIX)))  \
        $(addprefix md/os2/$(OBJDIR)/,$(ASFILES:.asm=.$(OBJ_SUFFIX)))

to:
  
OBJS += $(addprefix md/os2/$(OBJDIR)/,$(CSRCS:.c=.$(OBJ_SUFFIX))) \
        $(addprefix
md/os2/$(OBJDIR)/,$(PR_MD_ASFILES:.$(ASM_SUFFIX)=.$(OBJ_SUFFIX)))

6) Last but not least, copy nsprpub/pr/src/md/unix/os_Linux_x86.s to
nsprpub/pr/src/md/os2emx.s.

h~

Reply via email to