[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

php install - mycrypt



 

Support

 

I’m trying to install php w/ mcrypt.  I take you suggestions of:

 

#ifdef malloc

#undef malloc
extern void *malloc(size_t);

void * rpl_malloc(size_t size)
{
if (!size) size++;
return malloc(size);
}

#undef realloc
extern void *realloc(void *, size_t);

void *rpl_realloc(void *p, size_t size)
{
if (!size) size++;
return (p ? realloc(p,size) : malloc(size));
}

#endif
EOF

 

In the xmemory.c file in lib.

 

And I still get the same result.  I’ve been working on this quit sometime, so any assistance would be greatly appreciated.

 

gcc -g -O2 -o .libs/ciphertest cipher_test.o  ../lib/.libs/libmcrypt.so                  

ld: (Warning) Unsatisfied symbol "rpl_realloc" in file ../lib/.libs/libmcrypt.so         

1 warnings.                                                                              

creating ciphertest                                                                      

        source='aes_test.c' object='aes_test.o' libtool=no \                              

        DEPDIR=.deps depmode=none /bin/sh ../depcomp \                                   

        gcc -DHAVE_CONFIG_H -I. -I. -I..      -g -O2 -c aes_test.c                       

        /bin/sh ../libtool --tag=CC --mode=link gcc  -g -O2    -o aestest  aes_test.o ../l

ib/libmcrypt.la                                                                          

gcc -g -O2 -o .libs/aestest aes_test.o  ../lib/.libs/libmcrypt.so                        

ld: (Warning) Unsatisfied symbol "rpl_realloc" in file ../lib/.libs/libmcrypt.so         

1 warnings.                                                                              

creating aestest                                                                         

Making all in doc                                                                         

No suffix list.                                                                          

No suffix list.                                                                          

No suffix list.                                                                          

 /bin/sh ./config.status                                                                 

config.status: creating Makefile                                                         

config.status: creating libmcrypt.spec                                                   

config.status: creating lib/Makefile                                                      

config.status: creating doc/Makefile                                                     

config.status: creating src/Makefile                                                     

config.status: creating include/mutils/mcrypt.h                                           

config.status: creating include/Makefile                                                 

config.status: creating modules/Makefile                                                 

config.status: creating modules/modes/Makefile                                           

config.status: creating modules/algorithms/Makefile                                      

config.status: creating lib/libmcrypt-config                                             

config.status: creating config.h                                                         

config.status: config.h is unchanged                                                     

config.status: executing depfiles commands                                               

config.status: executing default-1 commands                                              

cphpstd2:/opt/isv/depot/libmcrypt-2.5.8                                                  



The information in this Internet Email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this Email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this Email are subject to the terms and conditions expressed in any applicable governing The Home Depot terms of business or client engagement letter. The Home Depot disclaims all responsibility and liability for the accuracy and content of this attachment and for any damages or losses arising from any inaccuracies, errors, viruses, e.g., worms, trojan horses, etc., or other items of a destructive nature, which may be contained in this attachment and shall not be liable for direct, indirect, consequential or special damages in connection with this e-mail message or its attachment.
/*
 * Copyright (C) 1998,1999 Nikos Mavroyanopoulos
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

/* $Id: xmemory.c,v 1.3 2001/05/17 18:58:20 nmav Exp $ */

#ifndef LIBDEFS_H
# define LIBDEFS_H
# include <libdefs.h>
#endif
#include <bzero.h>

#ifdef HAVE_MLOCK
# ifdef HAVE_SYS_MMAN_H
#  include <sys/mman.h>
# endif
#endif

#ifdef HAVE_MLOCK
void LOCKMEM(void *x, size_t size)
{
	mlock(x, size);
}

# define UNLOCKMEM(x,y) munlock(x,y)
#else
# define LOCKMEM(x,y)
# define UNLOCKMEM(x,y)
#endif

#include <bzero.h>

/* memory allocation */

void *mxmalloc(size_t size)
{
	char *x;

	x = malloc(size);

	if (x != NULL) {
		LOCKMEM(x, size);
		return x;
	}
	return NULL;
}

void *mxcalloc(size_t nmemb, size_t size)
{
	char *x;

	x = calloc(nmemb, size);
	if (x != NULL) {
		LOCKMEM(x, size);
		return x;
	}
	return NULL;
}

void *mxrealloc(void *ptr, size_t size)
{
	char *x;

	x = realloc(ptr, size);
	if (x != NULL) {
		LOCKMEM(x, size);
		return x;
	}
	return NULL;
}


void mxfree(void *ptr, size_t size)
{

	Bzero(ptr, size);
	UNLOCKMEM(ptr, size);
	free(ptr);

}
#ifdef malloc

#undef malloc
extern void *malloc(size_t);

void * rpl_malloc(size_t size)
{
if (!size) size++;
return malloc(size);
}

#undef realloc
extern void *realloc(void *, size_t);

void *rpl_realloc(void *p, size_t size)
{
if (!size) size++;
return (p ? realloc(p,size) : malloc(size));
}

#endif

Reply to: