All of the globals in env_unix.c are supposed to be globals.

The env_init() function is called once in the entire run of the application. It should be called prior to starting any threads, just as the linkage.c module is. If necessary, call myusername(), e.g.,

int main (int argc,char *argv[])
{
#include "linkage.c"
  myusername();
  start_my_application(argc,argv);
}

If your application is a mail client, there is no reason why it should not want myUserName and myHomeDir to be global across all threads. This is the client's local username and home directory, and NOT any username or home directory on a server.

-- Mark --

http://panda.com/mrc
Democracy is two wolves and a sheep deciding what to eat for lunch.
Liberty is a well-armed sheep contesting the vote.
_______________________________________________
Imap-uw mailing list
[email protected]
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw

Reply via email to