Changeset 16949


Ignore:
Timestamp:
2008-08-21T15:34:51+12:00 (16 years ago)
Author:
davidb
Message:

Wrong variable used in putenv(). Needed to put 'putpath' not 'path'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/common-src/src/lib/gsdltools.cpp

    r16909 r16949  
    2626#include "gsdltools.h"
    2727#include "fileutil.h"
     28
     29
     30#if defined(GSDL_USE_OBJECTSPACE)
     31#  include <ospace/std/iostream>
     32#elif defined(GSDL_USE_IOS_H)
     33#  include <iostream.h>
     34#else
     35#  include <iostream>
     36using namespace std;
     37#endif
     38
    2839
    2940#if defined(__WIN32__)
     
    216227  retain_gsdlosc   = putgsdlos.getcstr();
    217228  retain_gsdlhomec = putgsdlhome.getcstr();
    218   retain_pathc     = path.getcstr();
     229  retain_pathc     = putpath.getcstr();
    219230 
    220231  if ((putenv(retain_gsdlosc)!=0) || (putenv(retain_gsdlhomec)!=0) 
    221232  || (putenv(retain_pathc)!=0))
    222233    {
    223       perror("Setting Greenstone environment variables with putenv()");
     234      // Would be better if the ostream& logout was used here.
     235      cerr << "Error setting Greenstone environment variables with putenv()" << endl;
     236      // perror("putenv(...): "); // This didn't yield any noticable output under Windows running local library server
    224237      return false;
    225238    }
Note: See TracChangeset for help on using the changeset viewer.