I changed the code as follows, sorry it is not in diff format.  Essentially
remove the assembly language section and define and set tsc=0 which causes
the later code to use another random gen method.


 static int have_perfc =1;
 static int have_tsc = 0;//add line
#ifndef __GNUC__
/*                    //add line
 static int have_tsc = 1;
 DWORD cyclecount;
 if (have_tsc) {
   __try {
     __asm {
       rdtsc
       mov cyclecount, eax
       }
     RAND_add(&cyclecount, sizeof(cyclecount), 1);
   } __except(EXCEPTION_EXECUTE_HANDLER) {
     have_tsc = 0;
   }
 }
*/                        //add line
#else
----- Original Message -----
From: Sprinna
Sent: Thursday, October 19, 2000 8:23 AM
Subject: While compiling openSSL in winnt4.0

Hi,
I've followed the instruction in install.w32:
1. > perl Configure VC-WIN32
2.> ms\do_ms
3.> nmake -f ms\ntdll.mak
While I compiled openSSL, an error occured in
openSSL\crypto\rand\rand_win.c
that is :.\crypto\rand\rand_win.c<581>: error c2400: inline asembler
syntax error in 'opcode'; found 'newline'
=======================FOllowing is the code in line 581
574 static int have_tsc = 1;
DWORD cyclecount;
 
if (have_tsc) {
  __try {
    __asm {
      rdtsc
581       mov cyclecount, eax
    }
    RAND_add(&cyclecount, sizeof(cyclecount), 1);
  } __except(EXCEPTION_EXECUTE_HANDLER) {
    have_tsc = 0;
  }
}
 
Do you know why?
Thanks!
Sprinna:)

Reply via email to