diff -ur fam-oss-2.6.4/libfam/Client.c++ fam-oss-2.6.4.new/libfam/Client.c++ --- fam-oss-2.6.4/libfam/Client.c++ Fri May 19 21:46:32 2000 +++ fam-oss-2.6.4.new/libfam/Client.c++ Thu Sep 7 15:52:00 2000 @@ -38,6 +38,8 @@ #include "fam.h" #include "Client.h" +using namespace FAM; + static void getword(const char *p, u_int32_t *l); Client::Client(long host, unsigned int prog, int vers) diff -ur fam-oss-2.6.4/libfam/Client.h fam-oss-2.6.4.new/libfam/Client.h --- fam-oss-2.6.4/libfam/Client.h Fri May 19 21:46:32 2000 +++ fam-oss-2.6.4.new/libfam/Client.h Thu Sep 7 15:51:35 2000 @@ -31,6 +31,8 @@ struct FAMEvent; +namespace FAM { + class Client { public: Client(long hostaddr, unsigned int prog, int vers); @@ -58,4 +60,6 @@ BTree *endExist; char *inend,inbuf[MSGBUFSIZ]; }; + +} #endif diff -ur fam-oss-2.6.4/libfam/fam.c++ fam-oss-2.6.4.new/libfam/fam.c++ --- fam-oss-2.6.4/libfam/fam.c++ Fri May 19 21:46:32 2000 +++ fam-oss-2.6.4.new/libfam/fam.c++ Thu Sep 7 15:53:18 2000 @@ -77,8 +77,8 @@ } // Try to connect. - fc->client = new Client(LOCALHOSTNUMBER, famnumber, famversion); - fc->fd = ((Client *)fc->client)->getSock(); + fc->client = new FAM::Client(LOCALHOSTNUMBER, famnumber, famversion); + fc->fd = ((FAM::Client *)fc->client)->getSock(); if (fc->fd < 0) { delete fc->client; fc->client = NULL; @@ -89,7 +89,7 @@ if (appName) { char msg[200]; snprintf(msg, sizeof(msg), "N0 %d %d %s\n", geteuid(), getegid(), appName); - ((Client *)fc->client)->writeToServer(msg, strlen(msg)+1); + ((FAM::Client *)fc->client)->writeToServer(msg, strlen(msg)+1); } return(0); @@ -102,7 +102,7 @@ int FAMClose(FAMConnection* fc) { - delete (Client *)fc->client; + delete (FAM::Client *)fc->client; return(0); } @@ -122,7 +122,7 @@ return -1; int reqnum = fr->reqnum; - Client *client = (Client *)fc->client; + FAM::Client *client = (FAM::Client *)fc->client; // store user data if necessary if(userData != NULL) client->storeUserData(reqnum, userData); @@ -191,7 +191,7 @@ { if(checkRequest(fr, filename) != 0) return -1; - Client *client = (Client *)fc->client; + FAM::Client *client = (FAM::Client *)fc->client; // store user data if necessary if (userData) client->storeUserData(fr->reqnum, userData); @@ -262,7 +262,7 @@ int FAMNextEvent(FAMConnection* fc, FAMEvent* fe) { fe->fc = fc; - return ((Client *)fc->client)->nextEvent(fe); + return ((FAM::Client *)fc->client)->nextEvent(fe); } // FAMPending tries to read one complete message into the input buffer. @@ -271,7 +271,7 @@ int FAMPending(FAMConnection* fc) { - return ((Client *)fc->client)->eventPending(); + return ((FAM::Client *)fc->client)->eventPending(); } @@ -324,7 +324,7 @@ snprintf(msg, MSGBUFSIZ, "%c%d %d %d\n", code, fr->reqnum, geteuid(), getegid()); // Send to FAM - ((Client *)fc->client)->writeToServer(msg, strlen(msg)+1); + ((FAM::Client *)fc->client)->writeToServer(msg, strlen(msg)+1); return(0); }