Mail Archives: djgpp/1998/09/18/07:02:17
Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> wrote:
>
> On Thu, 17 Sep 1998, Glenn David Blank wrote:
>
>> It would be much,
>> much simpler and smoother, if DJGPP didn't need to use DOS variables.
>> Is it possible to recompile DJGPP so that it gets its information in
>> some other way, such as a Windows file or even hard-coded for this
>> particular application?
>
> Please explain what DOS variables are you talking about.
Don't know if this is (supposed) to work, but if just the DJGPP
variable is of concern, maybe a putenv("DJGPP=k:/abcd/djgpp.env") in
your IDE might work? Then programs spawned by the IDE should use
this[1]. If it works it is easily extended to any variable you want.
It only works with programs spawned from the IDE though.
hth,
Robert.
[1] I am unsure if this works, but i think it should, at least it
works under solaris. with the following test program (tes.c):
/* -*- mode: C; compile-command: "gcc -Wall -o tes.exe tes.c" -*- */
/* quick and dirty get-/putenv test by rjvdboon AT cs DOT vu DOT nl */
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char **argv) {
char *t;
if (argc > 1) {
printf("%s option: %s\n", argv[0], argv[1]);
t = getenv("TST1TST");
if (t) {printf("%s\n", t); }else{ printf("no TST1TST"); }
} else {
printf("putenv + system:\n\n");
putenv("TST1TST=JaEnzoEnv");
system("tes jaja");
printf("\nsystem done\n");
}
return 0;
}
--
rjvdboon AT cs DOT vu DOT nl | "En dat is niet waar!" sprak ex-Staatsecretaris-
www.cs.vu.nl/~rjvdboon | van-Onderwijs Netelenbos fel.
- Raw text -