Fix kvm test. Uninstall

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@19518 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2004-06-14 22:27:22 +00:00
parent d1daf27fd2
commit 1282b5a5f2
9 changed files with 76 additions and 26 deletions

View file

@ -34,7 +34,7 @@ after-install::
$(MKDIRS) $(GNUSTEP_HEADERS)/$$OLD_DIR; \
for I in $$LIST ; do \
(echo "#warning $$I is now included using the path <$$NEW_DIR/$$I>";\
echo "#include <$$NEW_DIR/$$I>" ) \
echo "#include <$$NEW_DIR/$$I>" ) \
> $(GNUSTEP_HEADERS)/$$OLD_DIR/$$I; \
done
@ -43,7 +43,7 @@ after-install::
$(MKDIRS) $(GNUSTEP_HEADERS)/$$OLD_DIR; \
for I in $$LIST ; do \
(echo "#warning $$I is now included using the path <$$NEW_DIR/$$I>";\
echo "#include <$$NEW_DIR/$$I>" ) \
echo "#include <$$NEW_DIR/$$I>" ) \
> $(GNUSTEP_HEADERS)/$$OLD_DIR/$$I;\
done
@ -56,3 +56,25 @@ after-install::
> $(GNUSTEP_HEADERS)/$$OLD_DIR/$$I; \
done
before-uninstall::
-@OLD_DIR=Foundation; NEW_DIR=GNUstepBase; \
LIST="GSXML.h GSMime.h" ;\
for I in $$LIST ; do \
rm -f $(GNUSTEP_HEADERS)/$$OLD_DIR/$$I; \
done;
-@OLD_DIR=gnustep/unicode; NEW_DIR=GNUstepBase/unicode; \
LIST="caseconv.h cop.h cyrillic.h latin2.h decomp.h nextstep.h" ;\
for I in $$LIST ; do \
rm -f $(GNUSTEP_HEADERS)/$$OLD_DIR/$$I; \
done; \
rmdir $(GNUSTEP_HEADERS)/$$OLD_DIR
-@OLD_DIR=gnustep/base; NEW_DIR=GNUstepBase; \
LIST="$(GNU_HEADERS)" ;\
for I in $$LIST ; do \
rm -f $(GNUSTEP_HEADERS)/$$OLD_DIR/$$I; \
done; \
rmdir $(GNUSTEP_HEADERS)/$$OLD_DIR; \
rmdir $(GNUSTEP_HEADERS)/gnustep

View file

@ -71,12 +71,12 @@
#include <sys/fcntl.h>
#endif
#ifdef HAVE_LIBKVM
#ifdef HAVE_KVM_ENV
#include <kvm.h>
#include <fcntl.h>
#include <sys/param.h>
#include <sys/sysctl.h>
#endif /* HAVE_LIBKVM */
#endif /* HAVE_KVM_ENV */
#include "GSConfig.h"
#include "Foundation/NSString.h"
@ -315,7 +315,7 @@ _gnu_process_args(int argc, char *argv[], char *env[])
IF_NO_GC(RELEASE(arp));
}
#if !GS_FAKE_MAIN && ((defined(HAVE_PROCFS) || defined(HAVE_LIBKVM)) && (defined(HAVE_LOAD_METHOD)))
#if !GS_FAKE_MAIN && ((defined(HAVE_PROCFS) || defined(HAVE_KVM_ENV)) && (defined(HAVE_LOAD_METHOD)))
/*
* We have to save program arguments and environment before main () is
* executed, because main () could modify their values before we get a
@ -333,7 +333,7 @@ static char **_gnu_noobjc_env = NULL;
*/
+ (void) load
{
#ifdef HAVE_LIBKVM
#ifdef HAVE_KVM_ENV
/*
* Use the kvm library to open the kernel and read the environment and
* arguments. As we are not running as root we cannot open the memory
@ -410,7 +410,7 @@ static char **_gnu_noobjc_env = NULL;
_gnu_noobjc_argv[i] = NULL;
return;
#else /* !HAVE_LIBKVM (i.e. HAVE_PROCFS). */
#else /* !HAVE_KVM_ENV (i.e. HAVE_PROCFS). */
/*
* Now we have the problem of reading program arguments and
* environment. We take the environment from extern char **environ, and
@ -592,7 +592,7 @@ static char **_gnu_noobjc_env = NULL;
*/
abort();
#endif /* HAVE_PROGRAM_INVOCATION_NAME */
#endif /* !HAVE_LIBKVM (e.g. HAVE_PROCFS) */
#endif /* !HAVE_KVM_ENV (e.g. HAVE_PROCFS) */
malloc_error:
fprintf(stderr, "malloc() error when starting gnustep-base.\n");
fprintf(stderr, "Free some memory and then re-run the program.\n");
@ -633,7 +633,7 @@ _gnu_noobjc_free_vars(void)
_gnu_noobjc_free_vars();
}
}
#else /*! HAVE_PROCFS !HAVE_LOAD_METHOD !HAVE_LIBKVM */
#else /*! HAVE_PROCFS !HAVE_LOAD_METHOD !HAVE_KVM_ENV */
#ifdef __MINGW__
/* For WindowsAPI Library, we know the global variables (argc, etc) */