Programming question

From: Rick Beebe <richard.beebe_at_yale.edu>
Date: Wed, 18 Nov 1998 15:53:13 -0500

I need to SSL-ize our imap server and while looking to see if someone else
had done that work I came across an interesting program segment at
http://fy.chalmers.se/~appro/ssl_inetd.html. Basically, it's a code segment
that replaces read and write from libc with SSL'd versions. Link it into an
existing program and you're golden. There are caveats of course but it
looked like it would work for us.

Anyway, for this thing to work it needs to insert itself into the .init
segment so it gets magically run before the real program. The author wrote
it for Sun and he uses either

#pragma init(ssl_init)
static

or

asm("
.section \".init\"
    call ssl_init
    nop
");
static

Neither of these works under Digital C 5.6-071 (DU4.0d). The first on
compiles okay, but ssl_init isn't getting run. The second dies with syntax
errors. Anyone got any idea what the equivalent for DEC C would be? It's a
bit beyond me. I couldn't find anything in the manuals about integrating
assembly into C.

  _______________________________________________________________________

    Rick Beebe (203) 785-6416
    Network Engineering Manager FAX: (203) 785-3606
    ITS-Med Technology Operations Richard.Beebe_at_yale.edu
    Yale University School of Medicine
    P.O. Box 208078, New Haven, CT 06520-8078
  _______________________________________________________________________
Received on Wed Nov 18 1998 - 20:55:25 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:38 NZDT