$(PERL) $< | $(CC) -E - | tee $@ > /dev/null
o_init.o: o_init.c
- $(CC) $(CFLAGS) -c -o $@ $<
+ case "`(uname -s) 2>/dev/null`" in \
+ OSF1|IRIX*) _WL_INIT="-Wl,-init,OPENSSL_init" ;; \
+ HP-UX) _WL_INIT="-Wl,+init,OPENSSL_init" ;; \
+ AIX) _WL_INIT="-Wl,-binitfini:OPENSSL_init,-bnoobjreorder";; \
+ Darwin) ( while [ "x$1" != "x" -a "x$1" != "x-dynamiclib" ]; do shift; done; \
+ [ $# -ge 1 ] \
+ ) && _WL_INIT="-Wl,-init,_OPENSSL_init" ;; \
+ esac ; \
+ $(CC) $(CFLAGS) $(_WL_INIT) -c -o $@ $<
testapps:
[ -z "$(THIS)" ] || ( if expr " $(SDIRS) " : ".* des " >/dev/null; \
#define OPENSSL_ia32cap ((OPENSSL_ia32cap_loc())[0])
int OPENSSL_isservice(void);
-void OPENSSL_init(void);
-
/* BEGIN ERROR CODES */
/* The following lines are auto generated by the script mkerr.pl. Any changes
* made after this point may be overwritten when the script is next run.
static long (*get_debug_options_func)(void) = NULL;
#endif
+extern void OPENSSL_init(void);
int CRYPTO_set_mem_functions(void *(*m)(size_t), void *(*r)(void *, size_t),
void (*f)(void *))
{
+ /* Dummy call just to ensure OPENSSL_init() gets linked in */
+ OPENSSL_init();
if (!allow_customize)
return 0;
if ((m == 0) || (r == 0) || (f == 0))