diff --git a/cint/inc/G__ci.h b/cint/inc/G__ci.h
index 991c899483168e9d57005623b89ef8989628fa9d..c661c29d82dd039cac41e2fbf73ff0ca7556df51 100644
--- a/cint/inc/G__ci.h
+++ b/cint/inc/G__ci.h
@@ -21,8 +21,8 @@
 #ifndef G__CI_H
 #define G__CI_H
 
-#define G__CINTVERSION      5015060
-#define G__CINTVERSIONSTR  "5.15.60, Sep 29 2002"
+#define G__CINTVERSION      5015061
+#define G__CINTVERSIONSTR  "5.15.61, Oct 6 2002"
 
 
 /**********************************************************************
@@ -623,8 +623,17 @@ typedef int (*G__IgnoreInclude)();
 #define G__CSTUB       6
 #define G__CLINK      -2
 
+/* Link macro as function */
+#define G__MACROLINK  (-5)
+
+/* Link macro as function */
+#define G__METHODLINK  (-6)
+#define G__ONLYMETHODLINK  6
+
 #define G__NOLINK      0
 
+
+
 #else /* of G__CPLUSPLUS */
 
 /***************************************************************
@@ -1653,9 +1662,10 @@ typedef struct {
 #elif defined(__sparc) || defined(__sparc__) || defined(__SUNPRO_C)
 /**********************************************
  * Sun Sparc architecture
- *  No support yet,but give it a try
+ * Alignment is similar to Intel, but class/struct
+ * objects are passed by reference
  **********************************************/
-#define G__VAARG_NOSUPPORT
+/* #define G__VAARG_NOSUPPORT */
 
 #ifndef G__OLDIMPLEMENTATION1696
 #define G__VAARG_INC_COPY_N 4
@@ -1665,7 +1675,10 @@ typedef struct {
 #elif (defined(__PPC__)||defined(__ppc__))&&(defined(_AIX)||defined(__APPLE__))
 /**********************************************
  * PowerPC, AIX and Apple Mac
+ * It turned out it is quite difficult if not impossible to support PowerPC.
+ * PPC uses registers (general purpose 3-10, floating 1
  **********************************************/
+#define G__VAARG_NOSUPPORT
 #define G__VAARG_INC_COPY_N 4
 #define G__VAARG_PASS_BY_REFERENCE 8
 
@@ -1784,6 +1797,10 @@ extern G__EXPORT int G__fputerr G__P((int c));
 #define G__fprinterr  fprintf
 #endif
 
+#ifndef G__OLDIMPLEMENTATION1731
+extern G__EXPORT void G__SetUseCINTSYSDIR G__P((int UseCINTSYSDIR));
+#endif
+
 #ifdef G__ASM_WHOLEFUNC
 /**************************************************************************
 * Interface method to run bytecode function
diff --git a/cint/inc/common.h b/cint/inc/common.h
index 6eb674f426595ef9f04b1e30df13e17d38f822c3..2acacb3486ce794dab527188848d3af8c6a996d4 100644
--- a/cint/inc/common.h
+++ b/cint/inc/common.h
@@ -944,8 +944,19 @@ struct G__AppPragma {
 /*********************************************************************
 * x
 *********************************************************************/
-#define G__NAMEDMACROEXT  "_NM"
-#define G__NAMEDMACROEXT2 "_cint_NM"
+#define G__NAMEDMACROEXT  "NM"
+#define G__NAMEDMACROEXT2 "_cintNM"
+
+/***********************************************************************
+* for function overloading
+**********************************************************************/
+struct G__funclist {
+  struct G__ifunc_table *ifunc;
+  int ifn;
+  unsigned int rate;
+  unsigned int p_rate[G__MAXFUNCPARA];
+  struct G__funclist *prev;
+};
 
 /*********************************************************************
 * cint parser function and global variable prototypes
diff --git a/cint/inc/fproto.h b/cint/inc/fproto.h
index 6312ba627d194a5edf8fa66064f35aa7eda58e0e..a1e227719167b9aa0567c6d204be293122c03fb9 100644
--- a/cint/inc/fproto.h
+++ b/cint/inc/fproto.h
@@ -573,6 +573,11 @@ void G__freetemplatememfunc G__P((struct G__Definedtemplatememfunc *memfunctmplt
 char *G__gettemplatearg G__P((int n,struct G__Templatearg *def_para));
 void G__freetemplatearg G__P((struct G__Templatearg *def_para));
 void G__freetemplatefunc G__P((struct G__Definetemplatefunc *deftmpfunc));
+#ifndef G__OLDIMPLEMENTATION1727
+struct G__funclist* G__add_templatefunc G__P((char *funcnamein,struct G__param *libp,int hash,struct G__funclist *funclist,struct G__ifunc_table *p_ifunc,int isrecursive));
+struct G__funclist* G__funclist_add G__P((struct G__funclist *last,struct G__ifunc_table *ifunc,int ifn,int rate));
+void G__funclist_delete(struct G__funclist *body);
+#endif
 int G__templatefunc G__P((G__value *result,char *funcname,struct G__param *libp,int hash,int funcmatch));
 int G__matchtemplatefunc G__P((struct G__Definetemplatefunc *deftmpfunc,struct G__param *libp,struct G__Charlist *pcall_para,int funcmatch));
 int G__createtemplatefunc G__P((char *funcname,struct G__Templatearg *targ,int line_number,fpos_t *ppos));
diff --git a/cint/inc/global.h b/cint/inc/global.h
index 5006e90ee4e0bd20424ffa9a172ec0f2f3f3d772..fa6881f8999baa22ffd6cedf0526247c7449ed29 100644
--- a/cint/inc/global.h
+++ b/cint/inc/global.h
@@ -703,6 +703,11 @@ extern int G__default_link;
 /* 1713 */
 extern int G__gettingspecial;
 
+#ifndef G__OLDIMPLEMENTATION1725
+extern int G__gcomplevellimit;
+#endif
+
+
 #ifndef __CINT__
 #ifdef __cplusplus
 }
diff --git a/cint/include/_iostream b/cint/include/_iostream
index 0de4277dc230bb9d8b7f763d20f195837fdc3862..54e6105edbbb5a12424d6f09510b967eaf419ab7 100644
--- a/cint/include/_iostream
+++ b/cint/include/_iostream
@@ -74,7 +74,7 @@ int G__ateval(const unsigned short x) {return(0);}
 int G__ateval(const unsigned int x) {return(0);}
 int G__ateval(const unsigned long x) {return(0);}
 
-#ifdef G__ROOT
+#if defined(G__ROOT) && !defined(__MAKECINT__)
 int G__ateval(const TString& x) {
   std::cout << "(TString " << &x << ")\"" << x << "\"" << std::endl;
   return(1);
diff --git a/cint/src/cast.c b/cint/src/cast.c
index fc0646966bbbc1e3cc4fe45d2924b699065acf55..62b62423e038b2724a48781bb2b54afe639445c4 100644
--- a/cint/src/cast.c
+++ b/cint/src/cast.c
@@ -603,37 +603,70 @@ int reftype;
 {
   switch((char)type) {
   case 'd':
+#ifndef G__OLDIMPLEMENTATION1726
+    if(type!=buf->type) buf->ref = 0; /* questionable */
+#endif
     G__letdouble(buf,(char)type ,(double)G__double(*buf));
     break;
   case 'f':
+#ifndef G__OLDIMPLEMENTATION1726
+    if(type!=buf->type) buf->ref = 0; /* questionable */
+#endif
     G__letdouble(buf,(char)type ,(float)G__double(*buf));
     break;
   case 'b':
+#ifndef G__OLDIMPLEMENTATION1726
+    if(type!=buf->type) buf->ref = 0; /* questionable */
+#endif
     G__letint(buf,(char)type ,(unsigned char)G__int(*buf));
     break;
   case 'c':
+#ifndef G__OLDIMPLEMENTATION1726
+    if(type!=buf->type) buf->ref = 0; /* questionable */
+#endif
     G__letint(buf,(char)type ,(char)G__int(*buf));
     break;
   case 'r':
+#ifndef G__OLDIMPLEMENTATION1726
+    if(type!=buf->type) buf->ref = 0; /* questionable */
+#endif
     G__letint(buf,(char)type ,(unsigned short)G__int(*buf));
     break;
   case 's':
+#ifndef G__OLDIMPLEMENTATION1726
+    if(type!=buf->type) buf->ref = 0; /* questionable */
+#endif
     G__letint(buf,(char)type ,(short)G__int(*buf));
     break;
   case 'h':
+#ifndef G__OLDIMPLEMENTATION1726
+    if(type!=buf->type) buf->ref = 0; /* questionable */
+#endif
     G__letint(buf,(char)type ,(unsigned int)G__int(*buf));
     break;
   case 'i':
+#ifndef G__OLDIMPLEMENTATION1726
+    if(type!=buf->type) buf->ref = 0; /* questionable */
+#endif
     G__letint(buf,(char)type ,(int)G__int(*buf));
     break;
   case 'k':
+#ifndef G__OLDIMPLEMENTATION1726
+    if(type!=buf->type) buf->ref = 0; /* questionable */
+#endif
     G__letint(buf,(char)type ,(unsigned long)G__int(*buf));
     break;
   case 'l':
+#ifndef G__OLDIMPLEMENTATION1726
+    if(type!=buf->type) buf->ref = 0; /* questionable */
+#endif
     G__letint(buf,(char)type ,(long)G__int(*buf));
     break;
 #ifndef G__OLDIMPLEMENTATION1604
   case 'g':
+#ifndef G__OLDIMPLEMENTATION1726
+    if(type!=buf->type) buf->ref = 0; /* questionable */
+#endif
     G__letint(buf,(char)type ,(unsigned char)(G__int(*buf)?1:0));
     break;
 #endif
diff --git a/cint/src/disp.c b/cint/src/disp.c
index d6a7397e10c8f68dd2f6da3e83c0725901b2f6db..7149acadeb2126913a893b873e6bbdf0555729d0 100644
--- a/cint/src/disp.c
+++ b/cint/src/disp.c
@@ -247,7 +247,11 @@ struct G__ifunc_table *ifunc;
 #else
 		  ,' '
 #endif
+#ifndef G__OLDIMPLEMENTATION1730
+		  ,G__globalcomp?ifunc->globalcomp[i]:ifunc->busy[i]
+#else
 		  ,ifunc->busy[i]
+#endif
 		  );
 	  if(G__more(fp,msg)) return(1);
 #ifdef G__ASM_DBG
diff --git a/cint/src/func.c b/cint/src/func.c
index 0fb5f35aa26180e049c673787c881d300745288d..b62a08ee4688b0fc28a53b77bda12959f579611a 100644
--- a/cint/src/func.c
+++ b/cint/src/func.c
@@ -1813,6 +1813,37 @@ int memfunc_flag;
 	    return(G__null);
 	  }
 #endif
+#ifndef G__OLDIMPLEMENTATION1729
+	  /******************************************************************
+	   * Search template function
+	   ******************************************************************/
+	  G__exec_memberfunc = 1;
+	  G__memberfunc_tagnum=G__tagnum;
+	  G__memberfunc_struct_offset=G__store_struct_offset;
+	  if((G__EXACT==funcmatch||G__USERCONV==funcmatch)&&
+	     G__templatefunc(&result3,funcname,&fpara,hash,funcmatch)==1){
+	    
+#ifdef G__DUMPFILE
+	    if(G__dumpfile!=NULL && 0==G__no_exec_compile) {
+	      G__dumpspace -= 3;
+	      for(ipara=0;ipara<G__dumpspace;ipara++) fprintf(G__dumpfile," ");
+	      G__valuemonitor(result3,result7);
+	      fprintf(G__dumpfile ,"/* return(lib) %s()=%s */\n"
+		      ,funcname,result7);
+	    }
+#endif
+	    G__exec_memberfunc = store_exec_memberfunc;
+	    G__memberfunc_tagnum=store_memberfunc_tagnum;
+	    G__memberfunc_struct_offset=store_memberfunc_struct_offset;
+	    /* don't know why if(oprp) is needed, copied from line 2111 */
+	    if(oprp) *known3 = G__additional_parenthesis(&result3,&fpara);
+	    else *known3=1;
+	    return(result3);
+	  }
+	  G__exec_memberfunc = store_exec_memberfunc;
+	  G__memberfunc_tagnum=store_memberfunc_tagnum;
+	  G__memberfunc_struct_offset=store_memberfunc_struct_offset;
+#endif /* 1729 */
 	case G__CALLCONSTRUCTOR:
 #ifndef G__OLDIMPLEMENTATION1376
 	  if(G__NOLINK > G__globalcomp) break;
@@ -2078,6 +2109,9 @@ int memfunc_flag;
       G__memberfunc_struct_offset=store_memberfunc_struct_offset;
 #ifndef G__OLDIMPLEMENTATION1515
       if(oprp) *known3 = G__additional_parenthesis(&result3,&fpara);
+#ifndef G__OLDIMPLEMENTATION1729
+      else *known3=1; /* don't know why this was missing */
+#endif
 #endif
       return(result3);
     }
diff --git a/cint/src/global2.c b/cint/src/global2.c
index 5141f97bdcb4b8fd74ada12424c9ee3cb49f3591..440bfbb5c729410a7cc8b3506a69235e1b0fd548 100644
--- a/cint/src/global2.c
+++ b/cint/src/global2.c
@@ -494,6 +494,10 @@ int G__default_link = 1;
 /* 1713 */
 int G__gettingspecial = 0;
 
+#ifndef G__OLDIMPLEMENTATION1725
+int G__gcomplevellimit=1000;
+#endif
+
 /*
  * Local Variables:
  * c-tab-always-indent:nil
diff --git a/cint/src/ifunc.c b/cint/src/ifunc.c
index 8f19435b3657b5eb46f7f22c0bd913560b9f33cd..4a2939ab6c3c4ca0fc01e784f9df9b58decb3edc 100644
--- a/cint/src/ifunc.c
+++ b/cint/src/ifunc.c
@@ -159,7 +159,7 @@ int instsize;
 
   /* check if the function is already compiled, replace old one */
   if(ifunc->pentry[ifn]->bytecode) {
-    G__genericerror("Internal error: G__asm_storebytecodefunc duplicate");
+    G__genericerror("Internal error: G__asm_storebytecodefunc duplicated");
   }
 
   /* allocate bytecode buffer */
@@ -3680,16 +3680,9 @@ int formal_isconst;
 #define G__TOVOIDPMATCH   0x00000003
 
 /***********************************************************************
-* struct G__overload_func
-**********************************************************************/
-struct G__funclist {
-  struct G__ifunc_table *ifunc;
-  int ifn;
-  unsigned int rate;
-  unsigned int p_rate[G__MAXFUNCPARA];
-  struct G__funclist *prev;
-};
-
+ * function overloading resolution
+ * G__funclist is defined in common.h
+ **********************************************************************/
 struct G__funclist* G__funclist_add(last,ifunc,ifn,rate)
 struct G__funclist *last;
 struct G__ifunc_table *ifunc;
@@ -5118,6 +5111,9 @@ int isrecursive;
 #ifndef G__OLDIMPLEMENTATION1560
   char *ptmplt;
 #endif
+#ifndef G__OLDIMPLEMENTATION1727
+  char *pexplicitarg;
+#endif
 
   funcname = (char*)malloc(strlen(funcnamein)+1);
   strcpy(funcname,funcnamein);
@@ -5126,6 +5122,7 @@ int isrecursive;
   else               baseclass = &G__globalusingnamespace;
   if(0==baseclass->basen) baseclass = (struct G__inheritance*)NULL;
 
+
   call_para.string = (char*)NULL;
   call_para.next = (struct G__Charlist*)NULL;
   deftmpfunc = &G__definedtemplatefunc;
@@ -5144,6 +5141,17 @@ int isrecursive;
     }
   }
 #endif
+
+#ifndef G__OLDIMPLEMENTATION1727
+  if((pexplicitarg=strchr(funcname,'<'))) {
+    /* funcname="f<int>" ->  funcname="f" , pexplicitarg="int>" */
+    int tmp=0;
+    *pexplicitarg = 0;
+    ++pexplicitarg;
+    G__hash(funcname,hash,tmp);
+  }
+  /* else {pexplicitarg=NULL;} */
+#endif
   
   /* Search matching template function name */
   while(deftmpfunc->next) {
@@ -5161,7 +5169,11 @@ int isrecursive;
     }
 #endif
     if(deftmpfunc->hash==hash && strcmp(deftmpfunc->name,funcname)==0 &&
-       G__matchtemplatefunc(deftmpfunc,libp,&call_para,G__PROMOTION)) {
+       (G__matchtemplatefunc(deftmpfunc,libp,&call_para,G__PROMOTION)
+#ifndef G__OLDIMPLEMENTATION1727
+	|| pexplicitarg
+#endif
+	)) {
 
       if(-1!=deftmpfunc->parent_tagnum && 
 	 env_tagnum!=deftmpfunc->parent_tagnum) {
@@ -5179,10 +5191,38 @@ int isrecursive;
     match_found:
 
       G__friendtagnum = deftmpfunc->friendtagnum;
+
+#ifndef G__OLDIMPLEMENTATION1727
+      if(pexplicitarg) {
+	int npara=0;
+	G__gettemplatearglist(pexplicitarg,&call_para
+			      ,deftmpfunc->def_para,&npara);
+      }
+#endif
+
+#ifndef G__OLDIMPLEMENTATION1727
+      if(pexplicitarg) {
+	int tmp=0;
+	char *p = pexplicitarg-1;
+	pexplicitarg = (char*)malloc(strlen(funcname)+1);
+	strcpy(pexplicitarg,funcname);
+	*p = '<';
+	G__hash(funcname,hash,tmp);
+      }
+      else {
+	pexplicitarg = "";
+      }
+#endif
       
       /* matches funcname and parameter,
        * then expand the template and parse as prerun */
-      G__replacetemplate("",funcname
+      G__replacetemplate(
+#ifndef G__OLDIMPLEMENTATION1727
+			 pexplicitarg
+#else
+			 ""
+#endif
+			 ,funcname
 			 ,&call_para /* needs to make this up */
 			 ,deftmpfunc->def_fp
 			 ,deftmpfunc->line
@@ -5196,6 +5236,13 @@ int isrecursive;
 
       G__friendtagnum = store_friendtagnum;
 
+#ifndef G__OLDIMPLEMENTATION1727
+      if(pexplicitarg && pexplicitarg[0]) {
+	free((void*)pexplicitarg);
+      }
+      pexplicitarg=(char*)NULL;
+#endif
+
       /* search for instantiated template function */
       ifunc = p_ifunc;
       while(ifunc && ifunc->next && ifunc->next->allifunc) ifunc=ifunc->next;
diff --git a/cint/src/init.c b/cint/src/init.c
index cd272d90d192b8140322c5403fae59998a07cf61..bf6f8322e0bba45a1c97528be26b969e508243a3 100644
--- a/cint/src/init.c
+++ b/cint/src/init.c
@@ -728,10 +728,16 @@ char *argv[] ;
    * Get command options
    *************************************************************/
   while((c=getopt(argc,argv
-  ,"a:b:c:d:ef:gij:kl:mn:pq:rstu:vw:x:y:z:AB:CD:EF:G:I:J:KM:N:O:P:QRSTU:VW:X:Y:Z:"))
+  ,"a:b:c:d:ef:gij:kl:mn:pq:rstu:vw:x:y:z:AB:CD:EF:G:H:I:J:KM:N:O:P:QRSTU:VW:X:Y:Z:"))
 	!=EOF) {
     switch(c) {
 
+#ifndef G__OLDIMPLEMENTATION1725
+    case 'H': /* level of inclusion for dictionary generation */
+      G__gcomplevellimit = atoi(optarg);
+      break;
+#endif
+
     case 'J':
       G__dispmsg = atoi(optarg);
       break;
@@ -1008,7 +1014,7 @@ char *argv[] ;
        */
       G__globalcomp=atoi(optarg);
 #ifndef G__OLDIMPLEMENTATION1700
-      if(G__globalcomp<=10) {
+      if(G__globalcomp>=10) {
 	G__default_link = abs(G__globalcomp)%10;
 	G__globalcomp /= 10;
       }
@@ -1115,6 +1121,7 @@ char *argv[] ;
       G__more(G__sout,"  -f [file] : set break file\n");
       G__more(G__sout,"  -F [assignement] : set global variable\n");
       G__more(G__sout,"  -G [tracedmp] : dump exec trace into file\n");
+      G__more(G__sout,"* -H[1-100] : level of header inclusion activated for dictionary generation\n");
       G__more(G__sout,"  -i : interactively return undefined symbol value\n");
       G__more(G__sout,"  -I [includepath] : set include file search path\n");
 #ifndef G__OLDIMPLEMENTATION1525
diff --git a/cint/src/loadfile.c b/cint/src/loadfile.c
index 927384358a0ca4609728215d0da7e2ff9b75b010..9cce35f56656e4d4a18e65c12dfcdf7c7e5e1d1c 100644
--- a/cint/src/loadfile.c
+++ b/cint/src/loadfile.c
@@ -1,4 +1,4 @@
-//* /% C %/ */
+/* /% C %/ */
 /***********************************************************************
  * cint (C/C++ interpreter)
  ************************************************************************
@@ -169,6 +169,9 @@ int G__include_file()
   int store_cpp;
   int store_globalcomp;
   int expandflag=0;
+#ifndef G__OLDIMPLEMENTATION1725
+  static int G__gcomplevel=0;
+#endif
 
   while((c=G__fgetc())!='\n' && c!='\r'
 #ifndef G__OLDIMPLEMENTATION1261
@@ -241,13 +244,27 @@ int G__include_file()
   G__cpp=G__include_cpp;
 
   if(G__USERHEADER==G__kindofheader) {
+#ifndef G__OLDIMPLEMENTATION1725
+    store_globalcomp = G__globalcomp;
+    if(++G__gcomplevel>=G__gcomplevellimit) G__globalcomp=G__NOLINK;
     result = G__loadfile(filename);
+    --G__gcomplevel;
+    G__globalcomp=store_globalcomp;
+#else
+    result = G__loadfile(filename);
+#endif
   }
   else {
     /* <xxx.h> , 'xxx.h' */
     store_globalcomp=G__globalcomp;
     /* G__globalcomp=G__NOLINK; */
+#ifndef G__OLDIMPLEMENTATION1725
+    if(++G__gcomplevel>=G__gcomplevellimit) G__globalcomp=G__NOLINK;
+#endif
     result = G__loadfile(filename);
+#ifndef G__OLDIMPLEMENTATION1725
+    --G__gcomplevel;
+#endif
     G__globalcomp=store_globalcomp;
   }
   G__kindofheader = G__USERHEADER;
@@ -259,7 +276,17 @@ int G__include_file()
     if(G__LOADFILE_FAILURE==result && G__ispragmainclude) {
       G__ispragmainclude=0;
       c = G__fgetname(filename,"\n\r");
+#ifndef G__OLDIMPLEMENTATION1725
+      store_globalcomp = G__globalcomp;
+      if(++G__gcomplevel>=G__gcomplevellimit) G__globalcomp=G__NOLINK;
+      if('\n'!=c && '\r'!=c) result = G__include_file();
+#ifndef G__OLDIMPLEMENTATION1725
+      --G__gcomplevel;
+#endif
+      G__globalcomp=store_globalcomp;
+#else
       if('\n'!=c && '\r'!=c) result = G__include_file();
+#endif
     }
     else {
       G__fignoreline();
@@ -362,6 +389,18 @@ char *item;
 }
 #endif
 
+#ifndef G__OLDIMPLEMENTATION1731
+/******************************************************************
+ * G__SetUseCINTSYSDIR()
+ ******************************************************************/
+static int G__UseCINTSYSDIR=0;
+void G__SetUseCINTSYSDIR(UseCINTSYSDIR)
+int UseCINTSYSDIR;
+{
+  G__UseCINTSYSDIR=UseCINTSYSDIR;
+}
+#endif
+
 /******************************************************************
 * G__getcintsysdir()
 *
@@ -378,7 +417,12 @@ int G__getcintsysdir()
 #  ifdef CINTINCDIR
     env = CINTINCDIR;
 #  else
+#ifndef G__OLDIMPLEMENTATION1731
+    if(G__UseCINTSYSDIR) env=getenv("CINTSYSDIR");
+    else                 env=getenv("ROOTSYS");
+#else /* 1731 */
     env=getenv("ROOTSYS");
+#endif /* 1731 */
 #  endif
 # endif
 #elif defined(G__WILDC)
@@ -397,21 +441,26 @@ int G__getcintsysdir()
 /*      sprintf(G__cintsysdir,env);
       strcpy(&G__cintsysdir[strlen(G__cintsysdir)-1],".cint]");*/
       sprintf(G__cintsysdir,"%s[cint]",env);
-#else
+#else /* G__VMS */
 # ifdef ROOTBUILD
       sprintf(G__cintsysdir, "%s", env);
-# else
+# else /* ROOTBUILD */
 #  ifdef CINTINCDIR
       sprintf(G__cintsysdir, "%s", CINTINCDIR);
 #  else
+#ifndef G__OLDIMPLEMENTATION1731
+      if(G__UseCINTSYSDIR) strcpy(G__cintsysdir,env);
+      else                 sprintf(G__cintsysdir, "%s%scint", env, G__psep);
+#else /* 1731 */
       sprintf(G__cintsysdir, "%s%scint", env, G__psep);
+#endif /* 1731 */
 #  endif
-# endif
-#endif
+# endif /* ROOTBUILD */
+#endif /* G__VMS */
 
-#else
+#else /* G__ROOT */
       strcpy(G__cintsysdir,env);
-#endif
+#endif /* G__ROOT */
       return(EXIT_SUCCESS);
     }
     else {
@@ -1014,7 +1063,8 @@ char *filenamein;
   * The + or ++ can also be followed by either a 'g'
   * or an 'O' which means respectively to compile
   * in debug or optimized mode.
-  *************************************************/
+  *************************************************/  
+#ifndef G__OLDIMPLEMENTATION1734
   compiler_option = 0;
   if ( len>2 && (strncmp(filename+len-2,"+",1)==0 )
        && (strcmp(filename+len-1,"O")==0
@@ -1060,7 +1110,29 @@ char *filenamein;
 	return(G__LOADFILE_FAILURE);
     }
   }
+#else /* 1734 */
+  if ( len>1&& (strcmp(filename+len-1,"+")==0 ) ) {
+    if (len>2 && (strcmp(filename+len-2,"++")==0 ) ) {
+#ifndef G__OLDIMPLEMENTATION1303
+      compiler_option = "kf";
 #endif
+      len -= 2;
+    } else {
+      compiler_option = "k";
+      len -= 1;
+    } 
+    filename[len]='\0';
+    external_compiler = 1; /* Request external compilation
+			    * if available (in ROOT) */
+    if (G__ScriptCompiler!=0) {
+      if ( (*G__ScriptCompiler)(filename,compiler_option) )
+	return(G__LOADFILE_SUCCESS);
+      else
+	return(G__LOADFILE_FAILURE);
+    }
+  }
+#endif /* 1734 */
+#endif /* PHIL1 */
 
 #ifndef G__OLDIMPLEMENTATION1345
   G__LockCriticalSection();
@@ -2330,8 +2402,11 @@ char *name;
     return(tempname);
   }
 #elif ((__GNUC__>=3)||(__GNUC__>=2)&&(__GNUC_MINOR__>=96))&&(defined(__linux)||defined(__linux__))
-  strcpy(name,"/tmp/cint_XXXXXX");
+  const char *appendix="_cint";
+  strcpy(name,"/tmp/XXXXXX");
   mkstemp(name);
+  remove(name); /* mkstemp creates this file anyway. Delete it. questionable */
+  if(strlen(name)<G__MAXFILENAME-6) strcat(name,appendix);
   return(name);
 #else
   const char *appendix="_cint";
diff --git a/cint/src/newlink.c b/cint/src/newlink.c
index 1e7ede76fb8d714ecfdb95eba6655d2a6a4a0f03..a158962e4ec41a1787f5cbbaf68fc47112d1e0f8 100644
--- a/cint/src/newlink.c
+++ b/cint/src/newlink.c
@@ -34,8 +34,6 @@
 #define G__OLDIMPLEMENTATION1714
 #endif
 
-#define G__MACROLINK  (-5)
-
 
 #define G__OLDIMPLEMENTATION1336
 #ifndef G__OLDIMPLEMENTATION1336
@@ -463,8 +461,25 @@ static void G__ctordtor_initialize()
 {
   int i;
   G__ctordtor_status=(int*)malloc(sizeof(int)*(G__struct.alltag+1));
-  for(i=0;i<G__struct.alltag+1;i++)
+  for(i=0;i<G__struct.alltag+1;i++) {
+#ifndef G__OLDIMPLEMENTATION1730
+    /* If link for this class is turned off but one or more member functions
+     * are explicitly turned on, set G__ONLYMETHODLINK flag for the class */
+    struct G__ifunc_table *ifunc=G__struct.memfunc[i];
+    int ifn;
+    if(G__NOLINK==G__struct.globalcomp[i]) {
+      while(ifunc) {
+	for(ifn=0;ifn<ifunc->allifunc;ifn++) {
+	  if(G__METHODLINK==ifunc->globalcomp[ifn]) {
+	    G__struct.globalcomp[i] = G__ONLYMETHODLINK;
+	  }
+	}
+	ifunc=ifunc->next;
+      }
+    }
+#endif
     G__ctordtor_status[i]=G__CTORDTOR_UNINITIALIZED;
+  }
 }
 /**************************************************************************
 * G__ctordtor_destruct()
@@ -1510,7 +1525,11 @@ FILE *hfp;
 #endif
   fprintf(fp,"/* Setup class/struct taginfo */\n");
   for(i=0;i<G__struct.alltag;i++) {
-    if(G__NOLINK > G__struct.globalcomp[i] &&
+    if((G__NOLINK > G__struct.globalcomp[i]
+#ifndef G__OLDIMPLEMENTATION1730
+	|| G__ONLYMETHODLINK==G__struct.globalcomp[i]
+#endif
+	) &&
        (
 #ifndef G__OLDIMPLEMENTATION1677
 	(G__struct.hash[i] || 0==G__struct.name[i][0])
@@ -2453,7 +2472,13 @@ FILE *hfp;
   fprintf(fp,"*********************************************************/\n");
 
   for(i=0;i<G__struct.alltag;i++) {
-    if((G__CPPLINK==G__struct.globalcomp[i]||G__CLINK==G__struct.globalcomp[i])&&
+    if(
+       (G__CPPLINK==G__struct.globalcomp[i]||
+	G__CLINK==G__struct.globalcomp[i]
+#ifndef G__OLDIMPLEMENTATION1730
+	|| G__ONLYMETHODLINK==G__struct.globalcomp[i]
+#endif
+	) &&
        (-1==(int)G__struct.parent_tagnum[i]
 #ifndef G__OLDIMPLEMENTATION651
 	|| G__nestedclass
@@ -2486,6 +2511,10 @@ FILE *hfp;
 #endif
 #endif
 	     ) {
+#ifndef G__OLDIMPLEMENTATION1730
+	    if(G__ONLYMETHODLINK==G__struct.globalcomp[i]&&
+	       G__METHODLINK!=ifunc->globalcomp[j]) continue;
+#endif
 #ifndef G__OLDIMPLEMENTATION1656
 	    if(ifunc->pentry[j]->filenum<0) continue; /* already precompiled */
 #endif
@@ -2567,6 +2596,9 @@ FILE *hfp;
 	if(NULL==ifunc->next
 #ifndef G__OLDIMPLEMENTATON1656
 	   && G__NOLINK==G__struct.iscpplink[i]
+#endif
+#ifndef G__OLDIMPLEMENTATION1730
+	   && G__ONLYMETHODLINK!=G__struct.globalcomp[i]
 #endif
 	   )
 	  G__cppif_gendefault(fp,hfp,i,j,ifunc
@@ -2993,6 +3025,10 @@ struct G__ifunc_table *ifunc;
 	  int i;
 	  for(i=G__VAARG_SIZE/4-1;i>G__VAARG_SIZE/4-100;i--)	
 	    fprintf(fp,",G__va_arg_bufobj.x.i[%d]",i);
+#elif defined(__sparc) || defined(__sparc__) || defined(__SUNPRO_C)
+	  int i;
+	  for(i=0;i<100 /* G__VAARG_SIZE/4 */;i++)	
+	    fprintf(fp,",G__va_arg_bufobj.x.i[%d]",i);
 #elif (defined(__PPC__)||defined(__ppc__))&&(defined(_AIX)||defined(__APPLE__))
 	  int i;
 	  for(i=0;i<100;i++)	
@@ -3121,6 +3157,10 @@ struct G__ifunc_table *ifunc;
 	int i;
 	for(i=G__VAARG_SIZE/4-1;i>G__VAARG_SIZE/4-100;i--)	
 	  fprintf(fp,",G__va_arg_bufobj.x.i[%d]",i);
+#elif defined(__sparc) || defined(__sparc__) || defined(__SUNPRO_C)
+	int i;
+	for(i=0;i<100 /* G__VAARG_SIZE/4 */;i++)	
+	  fprintf(fp,",G__va_arg_bufobj.x.i[%d]",i);
 #elif (defined(__PPC__)||defined(__ppc__))&&(defined(_AIX)||defined(__APPLE__))
 	int i;
 	for(i=0;i<100;i++)	
@@ -4111,6 +4151,10 @@ struct G__ifunc_table *ifunc;
 	int i;
 	for(i=G__VAARG_SIZE/4-1;i>G__VAARG_SIZE/4-100;i--)	
 	  fprintf(fp,",G__va_arg_bufobj.x.i[%d]",i);
+#elif defined(__sparc) || defined(__sparc__) || defined(__SUNPRO_C)
+	int i;
+	for(i=0;i<100 /* G__VAARG_SIZE/4 */;i++)	
+	  fprintf(fp,",G__va_arg_bufobj.x.i[%d]",i);
 #elif (defined(__PPC__)||defined(__ppc__))&&(defined(_AIX)||defined(__APPLE__))
 	int i;
 	for(i=0;i<100;i++)	
@@ -4191,6 +4235,14 @@ struct G__ifunc_table *ifunc;
 	int i;
 	for(i=G__VAARG_SIZE/4-1;i>G__VAARG_SIZE/4-100;i--)	
 	  fprintf(fp,",G__va_arg_bufobj.x.i[%d]",i);
+#elif defined(__sparc) || defined(__sparc__) || defined(__SUNPRO_C)
+	int i;
+	for(i=0;i<100 /* G__VAARG_SIZE/4 */;i++)	
+	  fprintf(fp,",G__va_arg_bufobj.x.i[%d]",i);
+#elif (defined(__PPC__)||defined(__ppc__))&&(defined(_AIX)||defined(__APPLE__))
+	int i;
+	for(i=0;i<100;i++)	
+	  fprintf(fp,",G__va_arg_bufobj.x.i[%d]",i);
 #else
       fprintf(fp,",G__va_arg_bufobj");
 #endif
@@ -4796,6 +4848,9 @@ FILE *hfp;
 #endif
        (G__CPPLINK==G__struct.globalcomp[i]
 	||G__CLINK==G__struct.globalcomp[i]
+#ifndef G__OLDIMPLEMENTATION651
+	||G__ONLYMETHODLINK==G__struct.globalcomp[i]
+#endif
 	)) {
 #ifndef G__OLDIMPLEMENTATION651
       if(!G__nestedclass) {
@@ -4886,6 +4941,23 @@ FILE *hfp;
 	  strcpy(mappedtagname,G__map_cpp_name(tagname));
 	  if(G__CPPLINK==G__globalcomp && '$'!=G__struct.name[i][0]) {
 #ifndef G__OLDIMPLEMENTATION618
+#ifndef G__OLDIMPLEMENTATION618
+	    if(G__ONLYMETHODLINK==G__struct.globalcomp[i])
+	      fprintf(fp,"   G__tagtable_setup(G__get_linked_tagnum(&%s),sizeof(%s),%d,%d,%s,NULL,G__setup_memfunc%s);\n"
+		      ,G__mark_linked_tagnum(i)
+		      ,G__type2string('u',i,-1,0,0)
+		      ,G__globalcomp 
+#if !defined(G__OLDIMPLEMENTATION1545) && defined(G__ROOTSPECIAL)
+		      ,G__struct.isabstract[i]+G__struct.funcs[i]*0x100
+		      +G__struct.rootflag[i]*0x10000
+#elif !defined(G__OLDIMPLEMENTATION1442)
+		      ,G__struct.isabstract[i]+G__struct.funcs[i]*0x100
+#else
+		      ,G__struct.isabstract[i]
+#endif
+		      ,buf ,mappedtagname);
+	    else
+#endif
 	    if(G__suppress_methods) 
 	      fprintf(fp,"   G__tagtable_setup(G__get_linked_tagnum(&%s),sizeof(%s),%d,%d,%s,G__setup_memvar%s,NULL);\n"
 		      ,G__mark_linked_tagnum(i)
@@ -5639,7 +5711,11 @@ FILE *fp;
   }
 
   for(i=0;i<G__struct.alltag;i++) {
-    if(G__CPPLINK==G__struct.globalcomp[i]&&
+    if((G__CPPLINK==G__struct.globalcomp[i]
+#ifndef G__OLDIMPLEMENTATION1730
+	|| G__ONLYMETHODLINK==G__struct.globalcomp[i]
+#endif
+	)&&
        (-1==(int)G__struct.parent_tagnum[i]
 #ifndef G__OLDIMPLEMENTATION651
 	|| G__nestedclass
@@ -5697,6 +5773,10 @@ FILE *fp;
 #endif
 #endif
 	     ) {
+#ifndef G__OLDIMPLEMENTATION1730
+	    if(G__ONLYMETHODLINK==G__struct.globalcomp[i]&&
+	       G__METHODLINK!=ifunc->globalcomp[j]) continue;
+#endif
 #ifndef G__OLDIMPLEMENTATION1656
 	    if(ifunc->pentry[j]->filenum<0) continue; /* already precompiled */
 #endif
@@ -5934,6 +6014,9 @@ FILE *fp;
 	if(NULL==ifunc->next
 #ifndef G__OLDIMPLEMENTATON1656
 	   && G__NOLINK==G__struct.iscpplink[i]
+#endif
+#ifndef G__OLDIMPLEMENTATON1730
+	   && G__ONLYMETHODLINK!=G__struct.globalcomp[i]
 #endif
 	   ) {
 	  page=ifunc->page;
@@ -7492,6 +7575,9 @@ int globalcomp;
 * #pragma link off all variables;
 * #pragma link off all typedefs;
 * #pragma link off all methods;
+*
+* #pragma link [C++|off] all_method     ClassName;
+* #pragma link [C++|off] all_datamember ClassName;
 *              ^
 *
 * #pragma link postprocess file func;
@@ -7875,6 +7961,11 @@ int link_stub;
     int store_line = G__ifile.line_number;
     fgetpos(G__ifile.fp,&pos);
     c = G__fgetstream_template(buf,";\n\r<>");
+
+#ifndef G__OLDIMPLEMENTATION1730
+    if(G__CPPLINK==globalcomp) globalcomp=G__METHODLINK;
+#endif
+
 #ifndef G__OLDIMPLEMENTATION1309
 #ifndef G__OLDIMPLEMENTATION1523
     cy = strchr(buf,'(');
@@ -7956,6 +8047,17 @@ int link_stub;
     p = G__strrstr(buf,"::");
     if(p) {
       int ixx=0;
+#ifndef G__OLDIMPLEMENTATION1727
+      if(-1==x_ifunc->tagnum) {
+	int tagnum;
+	*p = 0;
+	tagnum = G__defined_tagname(buf,0);
+	if(-1!=tagnum) {
+	  x_ifunc = G__struct.memfunc[tagnum];
+	}
+	*p = ':';
+      }
+#endif
       p+=2;
       while(*p) buf[ixx++] = *p++;
       buf[ixx] = 0;
@@ -8098,6 +8200,22 @@ int link_stub;
 	ifunc = ifunc->next;
       }
     }
+#ifndef G__OLDIMPLEMENTATION1727
+    if(!done && (p=strchr(buf,'<'))) {
+      struct G__param fpara;
+      struct G__funclist *funclist=(struct G__funclist*)NULL;
+      int tmp=0;
+
+      fpara.paran=0;
+
+      G__hash(buf,hash,tmp);
+      funclist=G__add_templatefunc(buf,&fpara,hash,funclist,x_ifunc,0);
+      if(funclist) {
+	funclist->ifunc->globalcomp[funclist->ifn] = globalcomp;
+	++done;
+      }
+    }
+#endif
 #ifndef G__OLDIMPLEMENTATION1138
     if(!done && G__NOLINK!=globalcomp) {
 #ifdef G__ROOT
@@ -8213,9 +8331,86 @@ int link_stub;
 #endif
   }
 
+#ifndef G__OLDIMPLEMENTATION1730
+  /*************************************************************************
+  * #pragma link [spec] all_datamember [classname];
+  *  This is not needed because G__METHODLINK and G__ONLYMETHODLINK are
+  *  introduced. Keeping this just for future needs.
+  *************************************************************************/
+  else if(strncmp(buf,"all_datamembers",5)==0) {
+    if(';'!=c) c = G__fgetstream_template(buf,";\n\r");
+    if(buf[0]) {
+      struct G__var_array *var;
+      int ig15;
+      if(strcmp(buf,"::")==0) {
+	var = &G__global;
+      }
+      else {
+	int tagnum = G__defined_tagname(buf,0);
+	if(-1!=tagnum) {
+	  var= G__struct.memvar[tagnum];
+	}
+	else { /* must be an error */
+	  return;
+	}
+      }
+      while(var) {
+	for(ig15=0;ig15<var->allvar;ig15++) {
+	  var->globalcomp[ig15] = globalcomp;
+	  if(G__NOLINK==globalcomp) var->access[ig15] = G__PRIVATE;
+	  else                      var->access[ig15] = G__PUBLIC;
+	}
+	var=var->next;
+      }
+    }
+  }
+#endif /* 1730 */
+
+#ifndef G__OLDIMPLEMENTATION1730
+  /*************************************************************************
+  * #pragma link [spec] all_function|all_method [classname];
+  *  This is not needed because G__METHODLINK and G__ONLYMETHODLINK are
+  *  introduced. Keeping this just for future needs.
+  *************************************************************************/
+  else if(strncmp(buf,"all_methods",5)==0||
+	  strncmp(buf,"all_functions",5)==0) {
+    if(';'!=c) c = G__fgetstream_template(buf,";\n\r");
+#ifndef G__OLDIMPLEMENTATION1730
+    if(G__CPPLINK==globalcomp) globalcomp=G__METHODLINK;
+#endif
+    if(buf[0]) {
+      struct G__ifunc_table *ifunc;
+      int ifn;
+      if(strcmp(buf,"::")==0) {
+	ifunc = &G__ifunc;
+      }
+      else {
+	int tagnum = G__defined_tagname(buf,0);
+	if(-1!=tagnum) {
+	  ifunc = G__struct.memfunc[tagnum];
+	}
+	else { /* must be an error */
+	  return;
+	}
+      }
+      while(ifunc) {
+	for(ifn=0;ifn<ifunc->allifunc;ifn++) {
+	  ifunc->globalcomp[ifn] = globalcomp;
+	  if(G__NOLINK==globalcomp) ifunc->access[ifn] = G__PRIVATE;
+	  else                      ifunc->access[ifn] = G__PUBLIC;
+	}
+	ifunc=ifunc->next;
+      }
+    }
+    else {
+      G__suppress_methods = (globalcomp==G__NOLINK);
+    }
+  }
+#endif
+
 #ifndef G__OLDIMPLEMENTATION606
   /*************************************************************************
-  * #pragma link [spec] all methods;
+  * #pragma link [spec] methods;
   *************************************************************************/
   else if(strncmp(buf,"methods",3)==0) {
     G__suppress_methods = (globalcomp==G__NOLINK);
@@ -8396,6 +8591,27 @@ int link_stub;
 	    /* link class,struct */
 	    for(i=0;i<G__struct.alltag;i++) {
 	      if(G__struct.filenum[i]==ifile) {
+#ifndef G__OLDIMPLEMENTATION1730
+		struct G__var_array *var = G__struct.memvar[i];
+		int ifn;
+		while(var) {
+		  for(ifn=0;ifn<var->allvar;ifn++) {
+		    if(var->filenum[ifn]==ifile) {
+		      var->globalcomp[ifn] = globalcomp;
+		    }
+		  }
+		  var = var->next;
+		}
+		ifunc=G__struct.memfunc[i];
+		while(ifunc) {
+		  for(ifn=0;ifn<ifunc->allifunc;ifn++) {
+		    if(ifunc->pentry[ifn]&&ifunc->pentry[ifn]->filenum==ifile) {
+		      ifunc->globalcomp[ifn] = globalcomp;
+		    }
+		  }
+		  ifunc = ifunc->next;
+		}
+#endif
 		G__struct.globalcomp[i]=globalcomp;
 #ifndef G__OLDIMPLEMENTATION1597
                 /* Note this make the equivalent of '+' the
@@ -8450,6 +8666,27 @@ int link_stub;
       int j,flag;
       if(-1!=parent_tagnum) {
 	for(i=0;i<G__struct.alltag;i++) {
+#ifndef G__OLDIMPLEMENTATION1730
+	  struct G__var_array *var = G__struct.memvar[parent_tagnum];
+	  int ifn;
+	  while(var) {
+	    for(ifn=0;ifn<var->allvar;ifn++) {
+	      if(var->filenum[ifn]==ifile) {
+		var->globalcomp[ifn] = globalcomp;
+	      }
+	    }
+	    var = var->next;
+	  }
+	  ifunc=G__struct.memfunc[i];
+	  while(ifunc) {
+	    for(ifn=0;ifn<ifunc->allifunc;ifn++) {
+	      if(ifunc->pentry[ifn]&&ifunc->pentry[ifn]->filenum==ifile) {
+		ifunc->globalcomp[ifn] = globalcomp;
+	      }
+	    }
+	    ifunc = ifunc->next;
+	  }
+#endif
 	  flag = 0;
 	  j = i;
 	  G__struct.globalcomp[parent_tagnum]=globalcomp;
@@ -8459,6 +8696,26 @@ int link_stub;
 	  }
 #ifndef G__OLDIMPLEMENTATION1597
 	  if(flag) {
+#ifndef G__OLDIMPLEMENTATION1730
+	    var = G__struct.memvar[i];
+	    while(var) {
+	      for(ifn=0;ifn<var->allvar;ifn++) {
+		if(var->filenum[ifn]==ifile) {
+		  var->globalcomp[ifn] = globalcomp;
+		}
+	      }
+	      var = var->next;
+	    }
+	    ifunc=G__struct.memfunc[i];
+	    while(ifunc) {
+	      for(ifn=0;ifn<ifunc->allifunc;ifn++) {
+		if(ifunc->pentry[ifn]&&ifunc->pentry[ifn]->filenum==ifile) {
+		  ifunc->globalcomp[ifn] = globalcomp;
+		}
+	      }
+	      ifunc = ifunc->next;
+	    }
+#endif
 	    G__struct.globalcomp[i]=globalcomp;
 	    /* Note this make the equivalent of '+' the
 	       default for defined_in type of linking */
@@ -9291,8 +9548,9 @@ G__value *buf;
 float* G__Floatref(buf)
 G__value *buf;
 {
-  if('f'==buf->type && buf->ref) 
+  if('f'==buf->type && buf->ref) {
     return((float*)buf->ref);
+  }
   else if('d'==buf->type || 'f'==buf->type) 
     buf->obj.fl = (float)buf->obj.d;
   else 
diff --git a/cint/src/pause.c b/cint/src/pause.c
index 15fb9c0acb0cb6d7c5e935dbd91ac0a948e73510..2e742c4acd8e042de6d747e03e4cbcc296e8a5c1 100644
--- a/cint/src/pause.c
+++ b/cint/src/pause.c
@@ -1473,7 +1473,7 @@ char *pipefile;
 	  G__serr = fopen(filename,openmode);
 	  break;
 #ifndef G__OLDIMPLEMENTATION1722
-	case G__NUM_STDERR: /* stderr */
+	case G__NUM_STDBOTH: /* stdout & stderr */
 	  *psout = G__sout;
 	  *pserr = G__serr;
 	  G__sout = fopen(filename,openmode);
diff --git a/cint/src/pcode.c b/cint/src/pcode.c
index fbb196c8bd5da4fad659424439ca6f8452e1a68c..bb68d14a50617b76211499f00442e5a74d398547 100644
--- a/cint/src/pcode.c
+++ b/cint/src/pcode.c
@@ -927,7 +927,23 @@ long localmem;
       for(i=0;i<fpara.paran;i++) {
 	fpara.para[i]=G__asm_stack[sp-fpara.paran+i];
 #ifndef G__OLDIMPLEMENTATION724
-	if(0==fpara.para[i].ref) fpara.para[i].ref=(long)(&fpara.para[i].obj);
+	if(0==fpara.para[i].ref) {
+#ifndef G__OLDIMPLEMENTATION1726
+	  switch(fpara.para[i].type) {
+	  case 'f':
+	  case 'b':
+	  case 'c':
+	  case 'r':
+	  case 's':
+	    break;
+	  default:
+	    fpara.para[i].ref=(long)(&fpara.para[i].obj);
+	    break;
+	  }
+#else
+	  fpara.para[i].ref=(long)(&fpara.para[i].obj);
+#endif
+	}
 #endif
       }
       sp-=fpara.paran;
diff --git a/cint/src/pragma.c b/cint/src/pragma.c
index f637b7ab0e5cd66a8126ce44e9efff22a0227e4b..f1f5b6f1f0625d7adf4e0aae8c8eeed01b8e89cb 100644
--- a/cint/src/pragma.c
+++ b/cint/src/pragma.c
@@ -97,7 +97,15 @@ int *pmode;
   char command[G__ONELINE];
   c=G__fgetstream(command,";\n\r");
   if(strcmp(command,"on")==0||'\0'==command[0]) *pmode=1;
-  else if(strcmp(command,"off")==0) *pmode=0;
+  else if(strcmp(command,"ON")==0)              *pmode=1;
+  else if(strcmp(command,"off")==0)             *pmode=0;
+  else if(strcmp(command,"OFF")==0)             *pmode=0;
+#ifdef G__NEVER
+  else if(strcmp(command,"always")==0)          *pmode=2;
+  else if(strcmp(command,"ALWAYS")==0)          *pmode=2;
+  else if(strcmp(command,"all")==0)             *pmode=3;
+  else if(strcmp(command,"ALL")==0)             *pmode=3;
+#endif
   else                              *pmode=G__int(G__getexpr(command));
   return(c);
 }
@@ -782,8 +790,12 @@ FILE *fp;
       fprintf(fp,"%s\n",arg[0]);
     }
   }
+#ifndef G__OLDIMPLEMENTATON1724
+  return(EXIT_SUCCESS);
+#else
   G__genericerror("Error: '#pragma endcompile' not found");
   return(EXIT_FAILURE);
+#endif
 }
 /**************************************************************************
 * G__isautoccupdate()
diff --git a/cint/src/struct.c b/cint/src/struct.c
index 04e93a7e74bdaf7435b2136f8b522838db14b63c..f78f49f3a7b1e403c23956c725ed8f5717491758 100644
--- a/cint/src/struct.c
+++ b/cint/src/struct.c
@@ -91,6 +91,13 @@ int G__using_namespace()
        ) return 1;
 #endif
     basetagnum = G__defined_tagname(buf,2);
+#ifndef G__OLDIMPLEMENTATION1732
+    if(-1==basetagnum) {
+      G__fprinterr(G__serr,"Error: namespace %s is not defined",buf);
+      G__genericerror((char*)NULL);
+      return(0);
+    }
+#endif
     if(G__def_struct_member) {
       /* using directive in other namespace or class/struct */
       envtagnum=G__get_envtagnum();
@@ -622,6 +629,28 @@ int noerror;
   }
 #endif
 
+#ifndef G__OLDIMPLEMENTATION1735
+  /* search for typename */
+  store_var_type = G__var_type;
+  i=G__defined_typename(tagname);
+  G__var_type=store_var_type;
+  if(-1!=i) {
+    i=G__newtype.tagnum[i];
+    if(-1!=i) return(i);
+  }
+#ifndef G__OLDIMPLEMENTATION957
+  {
+    int i2=0,cx;
+      while((cx=tagname[i2++])) if(G__isoperator(cx)) return(-1);
+  }
+#endif
+  /* not found */
+  if(noerror==0) {
+    G__fprinterr(G__serr,
+	    "Error: class,struct,union or type %s not defined " ,tagname);
+    G__genericerror((char*)NULL);
+  }
+#else /* 1735 */
   /* not found */
   if(noerror==0) {
 #ifndef G__OLDIMPLEMENTATION957
@@ -641,6 +670,7 @@ int noerror;
 	    "Error: class,struct,union or type %s not defined " ,tagname);
     G__genericerror((char*)NULL);
   }
+#endif /* 1735 */
   return(-1);
 
 }
@@ -1069,6 +1099,8 @@ char type;
     G__genericerror((char*)NULL);
   }
 #endif
+
+ doitagain:
   
   /*
    * [struct|union|enum]   tagname{ member }  item ;
@@ -1103,7 +1135,23 @@ char type;
     }
   }
   else if(c==':') {
+#ifndef G__OLDIMPLEMENTATION1733
+    /* inheritance or nested class */
+    c = G__fgetc();
+    if(':'==c) {
+      strcat(tagname,"::");
+      len=strlen(tagname);
+      c=G__fgetname_template(tagname+len,"{:;=&");
+      goto doitagain;
+    }
+    else {
+      fseek(G__ifile.fp,-1,SEEK_CUR);
+      if(G__dispsource) G__disp_mask=1;
+      c=':';
+    }
+#else
     /* inheritance */
+#endif
   }
   else if(c==';') {
     /* tagname declaration */
diff --git a/cint/src/tmplt.c b/cint/src/tmplt.c
index 6e544e4bf72c9a3f4f9eafa7cfbe23c0170f3e77..a19bc5e783ce2966b060ab58061676b97c83365a 100644
--- a/cint/src/tmplt.c
+++ b/cint/src/tmplt.c
@@ -2152,7 +2152,11 @@ char *tagnamein;
   }
 
 #ifndef G__OLDIMPLEMENTATION682
-  if(-1!=scope_tagnum) {
+  if(-1!=scope_tagnum
+#ifndef G__OLDIMPLEMENTATION1736
+     || ':'==templatename[0]
+#endif
+     ) {
     int i=0;
     char *p = strrchr(templatename,':');
 #ifndef G__OLDIMPLEMENTATION778
@@ -3363,6 +3367,9 @@ int funcmatch;
 #ifndef G__OLDIMPLEMENTATION812
   struct G__ifunc_table *ifunc;
 #endif
+#ifndef G__OLDIMPLEMENTATION1728
+  char *pexplicitarg;
+#endif
 #ifndef G__OLDIMPLEMENTATION687
   int env_tagnum=G__get_envtagnum();
   struct G__inheritance *baseclass;
@@ -3378,6 +3385,17 @@ int funcmatch;
   if(0==baseclass->basen) baseclass = (struct G__inheritance*)NULL;
 #endif
 
+#ifndef G__OLDIMPLEMENTATION1728
+  if(/* 0==libp->paran && */ (pexplicitarg=strchr(funcname,'<'))) {
+    /* funcname="f<int>" ->  funcname="f" , pexplicitarg="int>" */
+    int tmp=0;
+    *pexplicitarg = 0;
+    ++pexplicitarg;
+    G__hash(funcname,hash,tmp);
+  }
+  /* else pexplicitarg==NULL */
+#endif
+
   call_para.string = (char*)NULL;
   call_para.next = (struct G__Charlist*)NULL;
   deftmpfunc = &G__definedtemplatefunc;
@@ -3386,7 +3404,11 @@ int funcmatch;
   while(deftmpfunc->next) {
     G__freecharlist(&call_para);
     if(deftmpfunc->hash==hash && strcmp(deftmpfunc->name,funcname)==0 &&
-       G__matchtemplatefunc(deftmpfunc,libp,&call_para,funcmatch)) {
+       (G__matchtemplatefunc(deftmpfunc,libp,&call_para,funcmatch)
+#ifndef G__OLDIMPLEMENTATION1728
+	|| pexplicitarg
+#endif
+	)) {
 
 #ifndef G__OLDIMPLEMENTATION687
       if(-1!=deftmpfunc->parent_tagnum &&
@@ -3409,9 +3431,37 @@ int funcmatch;
       G__friendtagnum = deftmpfunc->friendtagnum;
 #endif
 
+#ifndef G__OLDIMPLEMENTATION1728
+      if(pexplicitarg) {
+	int npara=0;
+	G__gettemplatearglist(pexplicitarg,&call_para
+			      ,deftmpfunc->def_para,&npara);
+      }
+#endif
+
+#ifndef G__OLDIMPLEMENTATION1728
+      if(pexplicitarg) {
+	int tmp=0;
+	char *p = pexplicitarg-1;
+	pexplicitarg = (char*)malloc(strlen(funcname)+1);
+	strcpy(pexplicitarg,funcname);
+	*p = '<';
+	G__hash(funcname,hash,tmp);
+      }
+      else {
+	pexplicitarg = "";
+      }
+#endif
+
       /* matches funcname and parameter,
        * then expand the template and parse as prerun */
-      G__replacetemplate("",funcname
+      G__replacetemplate(
+#ifndef G__OLDIMPLEMENTATION1728
+			 pexplicitarg
+#else
+			 ""
+#endif
+			 ,funcname
 			 ,&call_para /* needs to make this up */
 			 ,deftmpfunc->def_fp
 			 ,deftmpfunc->line
@@ -3429,6 +3479,12 @@ int funcmatch;
       G__friendtagnum = store_friendtagnum;
 #endif
 
+#ifndef G__OLDIMPLEMENTATION1728
+      if(pexplicitarg && pexplicitarg[0]) {
+	free((void*)pexplicitarg);
+      }
+#endif
+
       /* call the expanded template function */
 #ifndef G__OLDIMPLEMENTATION712
       store_exec_memberfunc = G__exec_memberfunc;
diff --git a/cint/src/v6_cast.cxx b/cint/src/v6_cast.cxx
index fc0646966bbbc1e3cc4fe45d2924b699065acf55..62b62423e038b2724a48781bb2b54afe639445c4 100644
--- a/cint/src/v6_cast.cxx
+++ b/cint/src/v6_cast.cxx
@@ -603,37 +603,70 @@ int reftype;
 {
   switch((char)type) {
   case 'd':
+#ifndef G__OLDIMPLEMENTATION1726
+    if(type!=buf->type) buf->ref = 0; /* questionable */
+#endif
     G__letdouble(buf,(char)type ,(double)G__double(*buf));
     break;
   case 'f':
+#ifndef G__OLDIMPLEMENTATION1726
+    if(type!=buf->type) buf->ref = 0; /* questionable */
+#endif
     G__letdouble(buf,(char)type ,(float)G__double(*buf));
     break;
   case 'b':
+#ifndef G__OLDIMPLEMENTATION1726
+    if(type!=buf->type) buf->ref = 0; /* questionable */
+#endif
     G__letint(buf,(char)type ,(unsigned char)G__int(*buf));
     break;
   case 'c':
+#ifndef G__OLDIMPLEMENTATION1726
+    if(type!=buf->type) buf->ref = 0; /* questionable */
+#endif
     G__letint(buf,(char)type ,(char)G__int(*buf));
     break;
   case 'r':
+#ifndef G__OLDIMPLEMENTATION1726
+    if(type!=buf->type) buf->ref = 0; /* questionable */
+#endif
     G__letint(buf,(char)type ,(unsigned short)G__int(*buf));
     break;
   case 's':
+#ifndef G__OLDIMPLEMENTATION1726
+    if(type!=buf->type) buf->ref = 0; /* questionable */
+#endif
     G__letint(buf,(char)type ,(short)G__int(*buf));
     break;
   case 'h':
+#ifndef G__OLDIMPLEMENTATION1726
+    if(type!=buf->type) buf->ref = 0; /* questionable */
+#endif
     G__letint(buf,(char)type ,(unsigned int)G__int(*buf));
     break;
   case 'i':
+#ifndef G__OLDIMPLEMENTATION1726
+    if(type!=buf->type) buf->ref = 0; /* questionable */
+#endif
     G__letint(buf,(char)type ,(int)G__int(*buf));
     break;
   case 'k':
+#ifndef G__OLDIMPLEMENTATION1726
+    if(type!=buf->type) buf->ref = 0; /* questionable */
+#endif
     G__letint(buf,(char)type ,(unsigned long)G__int(*buf));
     break;
   case 'l':
+#ifndef G__OLDIMPLEMENTATION1726
+    if(type!=buf->type) buf->ref = 0; /* questionable */
+#endif
     G__letint(buf,(char)type ,(long)G__int(*buf));
     break;
 #ifndef G__OLDIMPLEMENTATION1604
   case 'g':
+#ifndef G__OLDIMPLEMENTATION1726
+    if(type!=buf->type) buf->ref = 0; /* questionable */
+#endif
     G__letint(buf,(char)type ,(unsigned char)(G__int(*buf)?1:0));
     break;
 #endif
diff --git a/cint/src/v6_disp.cxx b/cint/src/v6_disp.cxx
index d6a7397e10c8f68dd2f6da3e83c0725901b2f6db..7149acadeb2126913a893b873e6bbdf0555729d0 100644
--- a/cint/src/v6_disp.cxx
+++ b/cint/src/v6_disp.cxx
@@ -247,7 +247,11 @@ struct G__ifunc_table *ifunc;
 #else
 		  ,' '
 #endif
+#ifndef G__OLDIMPLEMENTATION1730
+		  ,G__globalcomp?ifunc->globalcomp[i]:ifunc->busy[i]
+#else
 		  ,ifunc->busy[i]
+#endif
 		  );
 	  if(G__more(fp,msg)) return(1);
 #ifdef G__ASM_DBG
diff --git a/cint/src/v6_func.cxx b/cint/src/v6_func.cxx
index 0fb5f35aa26180e049c673787c881d300745288d..b62a08ee4688b0fc28a53b77bda12959f579611a 100644
--- a/cint/src/v6_func.cxx
+++ b/cint/src/v6_func.cxx
@@ -1813,6 +1813,37 @@ int memfunc_flag;
 	    return(G__null);
 	  }
 #endif
+#ifndef G__OLDIMPLEMENTATION1729
+	  /******************************************************************
+	   * Search template function
+	   ******************************************************************/
+	  G__exec_memberfunc = 1;
+	  G__memberfunc_tagnum=G__tagnum;
+	  G__memberfunc_struct_offset=G__store_struct_offset;
+	  if((G__EXACT==funcmatch||G__USERCONV==funcmatch)&&
+	     G__templatefunc(&result3,funcname,&fpara,hash,funcmatch)==1){
+	    
+#ifdef G__DUMPFILE
+	    if(G__dumpfile!=NULL && 0==G__no_exec_compile) {
+	      G__dumpspace -= 3;
+	      for(ipara=0;ipara<G__dumpspace;ipara++) fprintf(G__dumpfile," ");
+	      G__valuemonitor(result3,result7);
+	      fprintf(G__dumpfile ,"/* return(lib) %s()=%s */\n"
+		      ,funcname,result7);
+	    }
+#endif
+	    G__exec_memberfunc = store_exec_memberfunc;
+	    G__memberfunc_tagnum=store_memberfunc_tagnum;
+	    G__memberfunc_struct_offset=store_memberfunc_struct_offset;
+	    /* don't know why if(oprp) is needed, copied from line 2111 */
+	    if(oprp) *known3 = G__additional_parenthesis(&result3,&fpara);
+	    else *known3=1;
+	    return(result3);
+	  }
+	  G__exec_memberfunc = store_exec_memberfunc;
+	  G__memberfunc_tagnum=store_memberfunc_tagnum;
+	  G__memberfunc_struct_offset=store_memberfunc_struct_offset;
+#endif /* 1729 */
 	case G__CALLCONSTRUCTOR:
 #ifndef G__OLDIMPLEMENTATION1376
 	  if(G__NOLINK > G__globalcomp) break;
@@ -2078,6 +2109,9 @@ int memfunc_flag;
       G__memberfunc_struct_offset=store_memberfunc_struct_offset;
 #ifndef G__OLDIMPLEMENTATION1515
       if(oprp) *known3 = G__additional_parenthesis(&result3,&fpara);
+#ifndef G__OLDIMPLEMENTATION1729
+      else *known3=1; /* don't know why this was missing */
+#endif
 #endif
       return(result3);
     }
diff --git a/cint/src/v6_global2.cxx b/cint/src/v6_global2.cxx
index 5141f97bdcb4b8fd74ada12424c9ee3cb49f3591..440bfbb5c729410a7cc8b3506a69235e1b0fd548 100644
--- a/cint/src/v6_global2.cxx
+++ b/cint/src/v6_global2.cxx
@@ -494,6 +494,10 @@ int G__default_link = 1;
 /* 1713 */
 int G__gettingspecial = 0;
 
+#ifndef G__OLDIMPLEMENTATION1725
+int G__gcomplevellimit=1000;
+#endif
+
 /*
  * Local Variables:
  * c-tab-always-indent:nil
diff --git a/cint/src/v6_ifunc.cxx b/cint/src/v6_ifunc.cxx
index 8f19435b3657b5eb46f7f22c0bd913560b9f33cd..4a2939ab6c3c4ca0fc01e784f9df9b58decb3edc 100644
--- a/cint/src/v6_ifunc.cxx
+++ b/cint/src/v6_ifunc.cxx
@@ -159,7 +159,7 @@ int instsize;
 
   /* check if the function is already compiled, replace old one */
   if(ifunc->pentry[ifn]->bytecode) {
-    G__genericerror("Internal error: G__asm_storebytecodefunc duplicate");
+    G__genericerror("Internal error: G__asm_storebytecodefunc duplicated");
   }
 
   /* allocate bytecode buffer */
@@ -3680,16 +3680,9 @@ int formal_isconst;
 #define G__TOVOIDPMATCH   0x00000003
 
 /***********************************************************************
-* struct G__overload_func
-**********************************************************************/
-struct G__funclist {
-  struct G__ifunc_table *ifunc;
-  int ifn;
-  unsigned int rate;
-  unsigned int p_rate[G__MAXFUNCPARA];
-  struct G__funclist *prev;
-};
-
+ * function overloading resolution
+ * G__funclist is defined in common.h
+ **********************************************************************/
 struct G__funclist* G__funclist_add(last,ifunc,ifn,rate)
 struct G__funclist *last;
 struct G__ifunc_table *ifunc;
@@ -5118,6 +5111,9 @@ int isrecursive;
 #ifndef G__OLDIMPLEMENTATION1560
   char *ptmplt;
 #endif
+#ifndef G__OLDIMPLEMENTATION1727
+  char *pexplicitarg;
+#endif
 
   funcname = (char*)malloc(strlen(funcnamein)+1);
   strcpy(funcname,funcnamein);
@@ -5126,6 +5122,7 @@ int isrecursive;
   else               baseclass = &G__globalusingnamespace;
   if(0==baseclass->basen) baseclass = (struct G__inheritance*)NULL;
 
+
   call_para.string = (char*)NULL;
   call_para.next = (struct G__Charlist*)NULL;
   deftmpfunc = &G__definedtemplatefunc;
@@ -5144,6 +5141,17 @@ int isrecursive;
     }
   }
 #endif
+
+#ifndef G__OLDIMPLEMENTATION1727
+  if((pexplicitarg=strchr(funcname,'<'))) {
+    /* funcname="f<int>" ->  funcname="f" , pexplicitarg="int>" */
+    int tmp=0;
+    *pexplicitarg = 0;
+    ++pexplicitarg;
+    G__hash(funcname,hash,tmp);
+  }
+  /* else {pexplicitarg=NULL;} */
+#endif
   
   /* Search matching template function name */
   while(deftmpfunc->next) {
@@ -5161,7 +5169,11 @@ int isrecursive;
     }
 #endif
     if(deftmpfunc->hash==hash && strcmp(deftmpfunc->name,funcname)==0 &&
-       G__matchtemplatefunc(deftmpfunc,libp,&call_para,G__PROMOTION)) {
+       (G__matchtemplatefunc(deftmpfunc,libp,&call_para,G__PROMOTION)
+#ifndef G__OLDIMPLEMENTATION1727
+	|| pexplicitarg
+#endif
+	)) {
 
       if(-1!=deftmpfunc->parent_tagnum && 
 	 env_tagnum!=deftmpfunc->parent_tagnum) {
@@ -5179,10 +5191,38 @@ int isrecursive;
     match_found:
 
       G__friendtagnum = deftmpfunc->friendtagnum;
+
+#ifndef G__OLDIMPLEMENTATION1727
+      if(pexplicitarg) {
+	int npara=0;
+	G__gettemplatearglist(pexplicitarg,&call_para
+			      ,deftmpfunc->def_para,&npara);
+      }
+#endif
+
+#ifndef G__OLDIMPLEMENTATION1727
+      if(pexplicitarg) {
+	int tmp=0;
+	char *p = pexplicitarg-1;
+	pexplicitarg = (char*)malloc(strlen(funcname)+1);
+	strcpy(pexplicitarg,funcname);
+	*p = '<';
+	G__hash(funcname,hash,tmp);
+      }
+      else {
+	pexplicitarg = "";
+      }
+#endif
       
       /* matches funcname and parameter,
        * then expand the template and parse as prerun */
-      G__replacetemplate("",funcname
+      G__replacetemplate(
+#ifndef G__OLDIMPLEMENTATION1727
+			 pexplicitarg
+#else
+			 ""
+#endif
+			 ,funcname
 			 ,&call_para /* needs to make this up */
 			 ,deftmpfunc->def_fp
 			 ,deftmpfunc->line
@@ -5196,6 +5236,13 @@ int isrecursive;
 
       G__friendtagnum = store_friendtagnum;
 
+#ifndef G__OLDIMPLEMENTATION1727
+      if(pexplicitarg && pexplicitarg[0]) {
+	free((void*)pexplicitarg);
+      }
+      pexplicitarg=(char*)NULL;
+#endif
+
       /* search for instantiated template function */
       ifunc = p_ifunc;
       while(ifunc && ifunc->next && ifunc->next->allifunc) ifunc=ifunc->next;
diff --git a/cint/src/v6_init.cxx b/cint/src/v6_init.cxx
index cd272d90d192b8140322c5403fae59998a07cf61..bf6f8322e0bba45a1c97528be26b969e508243a3 100644
--- a/cint/src/v6_init.cxx
+++ b/cint/src/v6_init.cxx
@@ -728,10 +728,16 @@ char *argv[] ;
    * Get command options
    *************************************************************/
   while((c=getopt(argc,argv
-  ,"a:b:c:d:ef:gij:kl:mn:pq:rstu:vw:x:y:z:AB:CD:EF:G:I:J:KM:N:O:P:QRSTU:VW:X:Y:Z:"))
+  ,"a:b:c:d:ef:gij:kl:mn:pq:rstu:vw:x:y:z:AB:CD:EF:G:H:I:J:KM:N:O:P:QRSTU:VW:X:Y:Z:"))
 	!=EOF) {
     switch(c) {
 
+#ifndef G__OLDIMPLEMENTATION1725
+    case 'H': /* level of inclusion for dictionary generation */
+      G__gcomplevellimit = atoi(optarg);
+      break;
+#endif
+
     case 'J':
       G__dispmsg = atoi(optarg);
       break;
@@ -1008,7 +1014,7 @@ char *argv[] ;
        */
       G__globalcomp=atoi(optarg);
 #ifndef G__OLDIMPLEMENTATION1700
-      if(G__globalcomp<=10) {
+      if(G__globalcomp>=10) {
 	G__default_link = abs(G__globalcomp)%10;
 	G__globalcomp /= 10;
       }
@@ -1115,6 +1121,7 @@ char *argv[] ;
       G__more(G__sout,"  -f [file] : set break file\n");
       G__more(G__sout,"  -F [assignement] : set global variable\n");
       G__more(G__sout,"  -G [tracedmp] : dump exec trace into file\n");
+      G__more(G__sout,"* -H[1-100] : level of header inclusion activated for dictionary generation\n");
       G__more(G__sout,"  -i : interactively return undefined symbol value\n");
       G__more(G__sout,"  -I [includepath] : set include file search path\n");
 #ifndef G__OLDIMPLEMENTATION1525
diff --git a/cint/src/v6_loadfile.cxx b/cint/src/v6_loadfile.cxx
index 927384358a0ca4609728215d0da7e2ff9b75b010..9cce35f56656e4d4a18e65c12dfcdf7c7e5e1d1c 100644
--- a/cint/src/v6_loadfile.cxx
+++ b/cint/src/v6_loadfile.cxx
@@ -1,4 +1,4 @@
-//* /% C %/ */
+/* /% C %/ */
 /***********************************************************************
  * cint (C/C++ interpreter)
  ************************************************************************
@@ -169,6 +169,9 @@ int G__include_file()
   int store_cpp;
   int store_globalcomp;
   int expandflag=0;
+#ifndef G__OLDIMPLEMENTATION1725
+  static int G__gcomplevel=0;
+#endif
 
   while((c=G__fgetc())!='\n' && c!='\r'
 #ifndef G__OLDIMPLEMENTATION1261
@@ -241,13 +244,27 @@ int G__include_file()
   G__cpp=G__include_cpp;
 
   if(G__USERHEADER==G__kindofheader) {
+#ifndef G__OLDIMPLEMENTATION1725
+    store_globalcomp = G__globalcomp;
+    if(++G__gcomplevel>=G__gcomplevellimit) G__globalcomp=G__NOLINK;
     result = G__loadfile(filename);
+    --G__gcomplevel;
+    G__globalcomp=store_globalcomp;
+#else
+    result = G__loadfile(filename);
+#endif
   }
   else {
     /* <xxx.h> , 'xxx.h' */
     store_globalcomp=G__globalcomp;
     /* G__globalcomp=G__NOLINK; */
+#ifndef G__OLDIMPLEMENTATION1725
+    if(++G__gcomplevel>=G__gcomplevellimit) G__globalcomp=G__NOLINK;
+#endif
     result = G__loadfile(filename);
+#ifndef G__OLDIMPLEMENTATION1725
+    --G__gcomplevel;
+#endif
     G__globalcomp=store_globalcomp;
   }
   G__kindofheader = G__USERHEADER;
@@ -259,7 +276,17 @@ int G__include_file()
     if(G__LOADFILE_FAILURE==result && G__ispragmainclude) {
       G__ispragmainclude=0;
       c = G__fgetname(filename,"\n\r");
+#ifndef G__OLDIMPLEMENTATION1725
+      store_globalcomp = G__globalcomp;
+      if(++G__gcomplevel>=G__gcomplevellimit) G__globalcomp=G__NOLINK;
+      if('\n'!=c && '\r'!=c) result = G__include_file();
+#ifndef G__OLDIMPLEMENTATION1725
+      --G__gcomplevel;
+#endif
+      G__globalcomp=store_globalcomp;
+#else
       if('\n'!=c && '\r'!=c) result = G__include_file();
+#endif
     }
     else {
       G__fignoreline();
@@ -362,6 +389,18 @@ char *item;
 }
 #endif
 
+#ifndef G__OLDIMPLEMENTATION1731
+/******************************************************************
+ * G__SetUseCINTSYSDIR()
+ ******************************************************************/
+static int G__UseCINTSYSDIR=0;
+void G__SetUseCINTSYSDIR(UseCINTSYSDIR)
+int UseCINTSYSDIR;
+{
+  G__UseCINTSYSDIR=UseCINTSYSDIR;
+}
+#endif
+
 /******************************************************************
 * G__getcintsysdir()
 *
@@ -378,7 +417,12 @@ int G__getcintsysdir()
 #  ifdef CINTINCDIR
     env = CINTINCDIR;
 #  else
+#ifndef G__OLDIMPLEMENTATION1731
+    if(G__UseCINTSYSDIR) env=getenv("CINTSYSDIR");
+    else                 env=getenv("ROOTSYS");
+#else /* 1731 */
     env=getenv("ROOTSYS");
+#endif /* 1731 */
 #  endif
 # endif
 #elif defined(G__WILDC)
@@ -397,21 +441,26 @@ int G__getcintsysdir()
 /*      sprintf(G__cintsysdir,env);
       strcpy(&G__cintsysdir[strlen(G__cintsysdir)-1],".cint]");*/
       sprintf(G__cintsysdir,"%s[cint]",env);
-#else
+#else /* G__VMS */
 # ifdef ROOTBUILD
       sprintf(G__cintsysdir, "%s", env);
-# else
+# else /* ROOTBUILD */
 #  ifdef CINTINCDIR
       sprintf(G__cintsysdir, "%s", CINTINCDIR);
 #  else
+#ifndef G__OLDIMPLEMENTATION1731
+      if(G__UseCINTSYSDIR) strcpy(G__cintsysdir,env);
+      else                 sprintf(G__cintsysdir, "%s%scint", env, G__psep);
+#else /* 1731 */
       sprintf(G__cintsysdir, "%s%scint", env, G__psep);
+#endif /* 1731 */
 #  endif
-# endif
-#endif
+# endif /* ROOTBUILD */
+#endif /* G__VMS */
 
-#else
+#else /* G__ROOT */
       strcpy(G__cintsysdir,env);
-#endif
+#endif /* G__ROOT */
       return(EXIT_SUCCESS);
     }
     else {
@@ -1014,7 +1063,8 @@ char *filenamein;
   * The + or ++ can also be followed by either a 'g'
   * or an 'O' which means respectively to compile
   * in debug or optimized mode.
-  *************************************************/
+  *************************************************/  
+#ifndef G__OLDIMPLEMENTATION1734
   compiler_option = 0;
   if ( len>2 && (strncmp(filename+len-2,"+",1)==0 )
        && (strcmp(filename+len-1,"O")==0
@@ -1060,7 +1110,29 @@ char *filenamein;
 	return(G__LOADFILE_FAILURE);
     }
   }
+#else /* 1734 */
+  if ( len>1&& (strcmp(filename+len-1,"+")==0 ) ) {
+    if (len>2 && (strcmp(filename+len-2,"++")==0 ) ) {
+#ifndef G__OLDIMPLEMENTATION1303
+      compiler_option = "kf";
 #endif
+      len -= 2;
+    } else {
+      compiler_option = "k";
+      len -= 1;
+    } 
+    filename[len]='\0';
+    external_compiler = 1; /* Request external compilation
+			    * if available (in ROOT) */
+    if (G__ScriptCompiler!=0) {
+      if ( (*G__ScriptCompiler)(filename,compiler_option) )
+	return(G__LOADFILE_SUCCESS);
+      else
+	return(G__LOADFILE_FAILURE);
+    }
+  }
+#endif /* 1734 */
+#endif /* PHIL1 */
 
 #ifndef G__OLDIMPLEMENTATION1345
   G__LockCriticalSection();
@@ -2330,8 +2402,11 @@ char *name;
     return(tempname);
   }
 #elif ((__GNUC__>=3)||(__GNUC__>=2)&&(__GNUC_MINOR__>=96))&&(defined(__linux)||defined(__linux__))
-  strcpy(name,"/tmp/cint_XXXXXX");
+  const char *appendix="_cint";
+  strcpy(name,"/tmp/XXXXXX");
   mkstemp(name);
+  remove(name); /* mkstemp creates this file anyway. Delete it. questionable */
+  if(strlen(name)<G__MAXFILENAME-6) strcat(name,appendix);
   return(name);
 #else
   const char *appendix="_cint";
diff --git a/cint/src/v6_newlink.cxx b/cint/src/v6_newlink.cxx
index 1e7ede76fb8d714ecfdb95eba6655d2a6a4a0f03..a158962e4ec41a1787f5cbbaf68fc47112d1e0f8 100644
--- a/cint/src/v6_newlink.cxx
+++ b/cint/src/v6_newlink.cxx
@@ -34,8 +34,6 @@
 #define G__OLDIMPLEMENTATION1714
 #endif
 
-#define G__MACROLINK  (-5)
-
 
 #define G__OLDIMPLEMENTATION1336
 #ifndef G__OLDIMPLEMENTATION1336
@@ -463,8 +461,25 @@ static void G__ctordtor_initialize()
 {
   int i;
   G__ctordtor_status=(int*)malloc(sizeof(int)*(G__struct.alltag+1));
-  for(i=0;i<G__struct.alltag+1;i++)
+  for(i=0;i<G__struct.alltag+1;i++) {
+#ifndef G__OLDIMPLEMENTATION1730
+    /* If link for this class is turned off but one or more member functions
+     * are explicitly turned on, set G__ONLYMETHODLINK flag for the class */
+    struct G__ifunc_table *ifunc=G__struct.memfunc[i];
+    int ifn;
+    if(G__NOLINK==G__struct.globalcomp[i]) {
+      while(ifunc) {
+	for(ifn=0;ifn<ifunc->allifunc;ifn++) {
+	  if(G__METHODLINK==ifunc->globalcomp[ifn]) {
+	    G__struct.globalcomp[i] = G__ONLYMETHODLINK;
+	  }
+	}
+	ifunc=ifunc->next;
+      }
+    }
+#endif
     G__ctordtor_status[i]=G__CTORDTOR_UNINITIALIZED;
+  }
 }
 /**************************************************************************
 * G__ctordtor_destruct()
@@ -1510,7 +1525,11 @@ FILE *hfp;
 #endif
   fprintf(fp,"/* Setup class/struct taginfo */\n");
   for(i=0;i<G__struct.alltag;i++) {
-    if(G__NOLINK > G__struct.globalcomp[i] &&
+    if((G__NOLINK > G__struct.globalcomp[i]
+#ifndef G__OLDIMPLEMENTATION1730
+	|| G__ONLYMETHODLINK==G__struct.globalcomp[i]
+#endif
+	) &&
        (
 #ifndef G__OLDIMPLEMENTATION1677
 	(G__struct.hash[i] || 0==G__struct.name[i][0])
@@ -2453,7 +2472,13 @@ FILE *hfp;
   fprintf(fp,"*********************************************************/\n");
 
   for(i=0;i<G__struct.alltag;i++) {
-    if((G__CPPLINK==G__struct.globalcomp[i]||G__CLINK==G__struct.globalcomp[i])&&
+    if(
+       (G__CPPLINK==G__struct.globalcomp[i]||
+	G__CLINK==G__struct.globalcomp[i]
+#ifndef G__OLDIMPLEMENTATION1730
+	|| G__ONLYMETHODLINK==G__struct.globalcomp[i]
+#endif
+	) &&
        (-1==(int)G__struct.parent_tagnum[i]
 #ifndef G__OLDIMPLEMENTATION651
 	|| G__nestedclass
@@ -2486,6 +2511,10 @@ FILE *hfp;
 #endif
 #endif
 	     ) {
+#ifndef G__OLDIMPLEMENTATION1730
+	    if(G__ONLYMETHODLINK==G__struct.globalcomp[i]&&
+	       G__METHODLINK!=ifunc->globalcomp[j]) continue;
+#endif
 #ifndef G__OLDIMPLEMENTATION1656
 	    if(ifunc->pentry[j]->filenum<0) continue; /* already precompiled */
 #endif
@@ -2567,6 +2596,9 @@ FILE *hfp;
 	if(NULL==ifunc->next
 #ifndef G__OLDIMPLEMENTATON1656
 	   && G__NOLINK==G__struct.iscpplink[i]
+#endif
+#ifndef G__OLDIMPLEMENTATION1730
+	   && G__ONLYMETHODLINK!=G__struct.globalcomp[i]
 #endif
 	   )
 	  G__cppif_gendefault(fp,hfp,i,j,ifunc
@@ -2993,6 +3025,10 @@ struct G__ifunc_table *ifunc;
 	  int i;
 	  for(i=G__VAARG_SIZE/4-1;i>G__VAARG_SIZE/4-100;i--)	
 	    fprintf(fp,",G__va_arg_bufobj.x.i[%d]",i);
+#elif defined(__sparc) || defined(__sparc__) || defined(__SUNPRO_C)
+	  int i;
+	  for(i=0;i<100 /* G__VAARG_SIZE/4 */;i++)	
+	    fprintf(fp,",G__va_arg_bufobj.x.i[%d]",i);
 #elif (defined(__PPC__)||defined(__ppc__))&&(defined(_AIX)||defined(__APPLE__))
 	  int i;
 	  for(i=0;i<100;i++)	
@@ -3121,6 +3157,10 @@ struct G__ifunc_table *ifunc;
 	int i;
 	for(i=G__VAARG_SIZE/4-1;i>G__VAARG_SIZE/4-100;i--)	
 	  fprintf(fp,",G__va_arg_bufobj.x.i[%d]",i);
+#elif defined(__sparc) || defined(__sparc__) || defined(__SUNPRO_C)
+	int i;
+	for(i=0;i<100 /* G__VAARG_SIZE/4 */;i++)	
+	  fprintf(fp,",G__va_arg_bufobj.x.i[%d]",i);
 #elif (defined(__PPC__)||defined(__ppc__))&&(defined(_AIX)||defined(__APPLE__))
 	int i;
 	for(i=0;i<100;i++)	
@@ -4111,6 +4151,10 @@ struct G__ifunc_table *ifunc;
 	int i;
 	for(i=G__VAARG_SIZE/4-1;i>G__VAARG_SIZE/4-100;i--)	
 	  fprintf(fp,",G__va_arg_bufobj.x.i[%d]",i);
+#elif defined(__sparc) || defined(__sparc__) || defined(__SUNPRO_C)
+	int i;
+	for(i=0;i<100 /* G__VAARG_SIZE/4 */;i++)	
+	  fprintf(fp,",G__va_arg_bufobj.x.i[%d]",i);
 #elif (defined(__PPC__)||defined(__ppc__))&&(defined(_AIX)||defined(__APPLE__))
 	int i;
 	for(i=0;i<100;i++)	
@@ -4191,6 +4235,14 @@ struct G__ifunc_table *ifunc;
 	int i;
 	for(i=G__VAARG_SIZE/4-1;i>G__VAARG_SIZE/4-100;i--)	
 	  fprintf(fp,",G__va_arg_bufobj.x.i[%d]",i);
+#elif defined(__sparc) || defined(__sparc__) || defined(__SUNPRO_C)
+	int i;
+	for(i=0;i<100 /* G__VAARG_SIZE/4 */;i++)	
+	  fprintf(fp,",G__va_arg_bufobj.x.i[%d]",i);
+#elif (defined(__PPC__)||defined(__ppc__))&&(defined(_AIX)||defined(__APPLE__))
+	int i;
+	for(i=0;i<100;i++)	
+	  fprintf(fp,",G__va_arg_bufobj.x.i[%d]",i);
 #else
       fprintf(fp,",G__va_arg_bufobj");
 #endif
@@ -4796,6 +4848,9 @@ FILE *hfp;
 #endif
        (G__CPPLINK==G__struct.globalcomp[i]
 	||G__CLINK==G__struct.globalcomp[i]
+#ifndef G__OLDIMPLEMENTATION651
+	||G__ONLYMETHODLINK==G__struct.globalcomp[i]
+#endif
 	)) {
 #ifndef G__OLDIMPLEMENTATION651
       if(!G__nestedclass) {
@@ -4886,6 +4941,23 @@ FILE *hfp;
 	  strcpy(mappedtagname,G__map_cpp_name(tagname));
 	  if(G__CPPLINK==G__globalcomp && '$'!=G__struct.name[i][0]) {
 #ifndef G__OLDIMPLEMENTATION618
+#ifndef G__OLDIMPLEMENTATION618
+	    if(G__ONLYMETHODLINK==G__struct.globalcomp[i])
+	      fprintf(fp,"   G__tagtable_setup(G__get_linked_tagnum(&%s),sizeof(%s),%d,%d,%s,NULL,G__setup_memfunc%s);\n"
+		      ,G__mark_linked_tagnum(i)
+		      ,G__type2string('u',i,-1,0,0)
+		      ,G__globalcomp 
+#if !defined(G__OLDIMPLEMENTATION1545) && defined(G__ROOTSPECIAL)
+		      ,G__struct.isabstract[i]+G__struct.funcs[i]*0x100
+		      +G__struct.rootflag[i]*0x10000
+#elif !defined(G__OLDIMPLEMENTATION1442)
+		      ,G__struct.isabstract[i]+G__struct.funcs[i]*0x100
+#else
+		      ,G__struct.isabstract[i]
+#endif
+		      ,buf ,mappedtagname);
+	    else
+#endif
 	    if(G__suppress_methods) 
 	      fprintf(fp,"   G__tagtable_setup(G__get_linked_tagnum(&%s),sizeof(%s),%d,%d,%s,G__setup_memvar%s,NULL);\n"
 		      ,G__mark_linked_tagnum(i)
@@ -5639,7 +5711,11 @@ FILE *fp;
   }
 
   for(i=0;i<G__struct.alltag;i++) {
-    if(G__CPPLINK==G__struct.globalcomp[i]&&
+    if((G__CPPLINK==G__struct.globalcomp[i]
+#ifndef G__OLDIMPLEMENTATION1730
+	|| G__ONLYMETHODLINK==G__struct.globalcomp[i]
+#endif
+	)&&
        (-1==(int)G__struct.parent_tagnum[i]
 #ifndef G__OLDIMPLEMENTATION651
 	|| G__nestedclass
@@ -5697,6 +5773,10 @@ FILE *fp;
 #endif
 #endif
 	     ) {
+#ifndef G__OLDIMPLEMENTATION1730
+	    if(G__ONLYMETHODLINK==G__struct.globalcomp[i]&&
+	       G__METHODLINK!=ifunc->globalcomp[j]) continue;
+#endif
 #ifndef G__OLDIMPLEMENTATION1656
 	    if(ifunc->pentry[j]->filenum<0) continue; /* already precompiled */
 #endif
@@ -5934,6 +6014,9 @@ FILE *fp;
 	if(NULL==ifunc->next
 #ifndef G__OLDIMPLEMENTATON1656
 	   && G__NOLINK==G__struct.iscpplink[i]
+#endif
+#ifndef G__OLDIMPLEMENTATON1730
+	   && G__ONLYMETHODLINK!=G__struct.globalcomp[i]
 #endif
 	   ) {
 	  page=ifunc->page;
@@ -7492,6 +7575,9 @@ int globalcomp;
 * #pragma link off all variables;
 * #pragma link off all typedefs;
 * #pragma link off all methods;
+*
+* #pragma link [C++|off] all_method     ClassName;
+* #pragma link [C++|off] all_datamember ClassName;
 *              ^
 *
 * #pragma link postprocess file func;
@@ -7875,6 +7961,11 @@ int link_stub;
     int store_line = G__ifile.line_number;
     fgetpos(G__ifile.fp,&pos);
     c = G__fgetstream_template(buf,";\n\r<>");
+
+#ifndef G__OLDIMPLEMENTATION1730
+    if(G__CPPLINK==globalcomp) globalcomp=G__METHODLINK;
+#endif
+
 #ifndef G__OLDIMPLEMENTATION1309
 #ifndef G__OLDIMPLEMENTATION1523
     cy = strchr(buf,'(');
@@ -7956,6 +8047,17 @@ int link_stub;
     p = G__strrstr(buf,"::");
     if(p) {
       int ixx=0;
+#ifndef G__OLDIMPLEMENTATION1727
+      if(-1==x_ifunc->tagnum) {
+	int tagnum;
+	*p = 0;
+	tagnum = G__defined_tagname(buf,0);
+	if(-1!=tagnum) {
+	  x_ifunc = G__struct.memfunc[tagnum];
+	}
+	*p = ':';
+      }
+#endif
       p+=2;
       while(*p) buf[ixx++] = *p++;
       buf[ixx] = 0;
@@ -8098,6 +8200,22 @@ int link_stub;
 	ifunc = ifunc->next;
       }
     }
+#ifndef G__OLDIMPLEMENTATION1727
+    if(!done && (p=strchr(buf,'<'))) {
+      struct G__param fpara;
+      struct G__funclist *funclist=(struct G__funclist*)NULL;
+      int tmp=0;
+
+      fpara.paran=0;
+
+      G__hash(buf,hash,tmp);
+      funclist=G__add_templatefunc(buf,&fpara,hash,funclist,x_ifunc,0);
+      if(funclist) {
+	funclist->ifunc->globalcomp[funclist->ifn] = globalcomp;
+	++done;
+      }
+    }
+#endif
 #ifndef G__OLDIMPLEMENTATION1138
     if(!done && G__NOLINK!=globalcomp) {
 #ifdef G__ROOT
@@ -8213,9 +8331,86 @@ int link_stub;
 #endif
   }
 
+#ifndef G__OLDIMPLEMENTATION1730
+  /*************************************************************************
+  * #pragma link [spec] all_datamember [classname];
+  *  This is not needed because G__METHODLINK and G__ONLYMETHODLINK are
+  *  introduced. Keeping this just for future needs.
+  *************************************************************************/
+  else if(strncmp(buf,"all_datamembers",5)==0) {
+    if(';'!=c) c = G__fgetstream_template(buf,";\n\r");
+    if(buf[0]) {
+      struct G__var_array *var;
+      int ig15;
+      if(strcmp(buf,"::")==0) {
+	var = &G__global;
+      }
+      else {
+	int tagnum = G__defined_tagname(buf,0);
+	if(-1!=tagnum) {
+	  var= G__struct.memvar[tagnum];
+	}
+	else { /* must be an error */
+	  return;
+	}
+      }
+      while(var) {
+	for(ig15=0;ig15<var->allvar;ig15++) {
+	  var->globalcomp[ig15] = globalcomp;
+	  if(G__NOLINK==globalcomp) var->access[ig15] = G__PRIVATE;
+	  else                      var->access[ig15] = G__PUBLIC;
+	}
+	var=var->next;
+      }
+    }
+  }
+#endif /* 1730 */
+
+#ifndef G__OLDIMPLEMENTATION1730
+  /*************************************************************************
+  * #pragma link [spec] all_function|all_method [classname];
+  *  This is not needed because G__METHODLINK and G__ONLYMETHODLINK are
+  *  introduced. Keeping this just for future needs.
+  *************************************************************************/
+  else if(strncmp(buf,"all_methods",5)==0||
+	  strncmp(buf,"all_functions",5)==0) {
+    if(';'!=c) c = G__fgetstream_template(buf,";\n\r");
+#ifndef G__OLDIMPLEMENTATION1730
+    if(G__CPPLINK==globalcomp) globalcomp=G__METHODLINK;
+#endif
+    if(buf[0]) {
+      struct G__ifunc_table *ifunc;
+      int ifn;
+      if(strcmp(buf,"::")==0) {
+	ifunc = &G__ifunc;
+      }
+      else {
+	int tagnum = G__defined_tagname(buf,0);
+	if(-1!=tagnum) {
+	  ifunc = G__struct.memfunc[tagnum];
+	}
+	else { /* must be an error */
+	  return;
+	}
+      }
+      while(ifunc) {
+	for(ifn=0;ifn<ifunc->allifunc;ifn++) {
+	  ifunc->globalcomp[ifn] = globalcomp;
+	  if(G__NOLINK==globalcomp) ifunc->access[ifn] = G__PRIVATE;
+	  else                      ifunc->access[ifn] = G__PUBLIC;
+	}
+	ifunc=ifunc->next;
+      }
+    }
+    else {
+      G__suppress_methods = (globalcomp==G__NOLINK);
+    }
+  }
+#endif
+
 #ifndef G__OLDIMPLEMENTATION606
   /*************************************************************************
-  * #pragma link [spec] all methods;
+  * #pragma link [spec] methods;
   *************************************************************************/
   else if(strncmp(buf,"methods",3)==0) {
     G__suppress_methods = (globalcomp==G__NOLINK);
@@ -8396,6 +8591,27 @@ int link_stub;
 	    /* link class,struct */
 	    for(i=0;i<G__struct.alltag;i++) {
 	      if(G__struct.filenum[i]==ifile) {
+#ifndef G__OLDIMPLEMENTATION1730
+		struct G__var_array *var = G__struct.memvar[i];
+		int ifn;
+		while(var) {
+		  for(ifn=0;ifn<var->allvar;ifn++) {
+		    if(var->filenum[ifn]==ifile) {
+		      var->globalcomp[ifn] = globalcomp;
+		    }
+		  }
+		  var = var->next;
+		}
+		ifunc=G__struct.memfunc[i];
+		while(ifunc) {
+		  for(ifn=0;ifn<ifunc->allifunc;ifn++) {
+		    if(ifunc->pentry[ifn]&&ifunc->pentry[ifn]->filenum==ifile) {
+		      ifunc->globalcomp[ifn] = globalcomp;
+		    }
+		  }
+		  ifunc = ifunc->next;
+		}
+#endif
 		G__struct.globalcomp[i]=globalcomp;
 #ifndef G__OLDIMPLEMENTATION1597
                 /* Note this make the equivalent of '+' the
@@ -8450,6 +8666,27 @@ int link_stub;
       int j,flag;
       if(-1!=parent_tagnum) {
 	for(i=0;i<G__struct.alltag;i++) {
+#ifndef G__OLDIMPLEMENTATION1730
+	  struct G__var_array *var = G__struct.memvar[parent_tagnum];
+	  int ifn;
+	  while(var) {
+	    for(ifn=0;ifn<var->allvar;ifn++) {
+	      if(var->filenum[ifn]==ifile) {
+		var->globalcomp[ifn] = globalcomp;
+	      }
+	    }
+	    var = var->next;
+	  }
+	  ifunc=G__struct.memfunc[i];
+	  while(ifunc) {
+	    for(ifn=0;ifn<ifunc->allifunc;ifn++) {
+	      if(ifunc->pentry[ifn]&&ifunc->pentry[ifn]->filenum==ifile) {
+		ifunc->globalcomp[ifn] = globalcomp;
+	      }
+	    }
+	    ifunc = ifunc->next;
+	  }
+#endif
 	  flag = 0;
 	  j = i;
 	  G__struct.globalcomp[parent_tagnum]=globalcomp;
@@ -8459,6 +8696,26 @@ int link_stub;
 	  }
 #ifndef G__OLDIMPLEMENTATION1597
 	  if(flag) {
+#ifndef G__OLDIMPLEMENTATION1730
+	    var = G__struct.memvar[i];
+	    while(var) {
+	      for(ifn=0;ifn<var->allvar;ifn++) {
+		if(var->filenum[ifn]==ifile) {
+		  var->globalcomp[ifn] = globalcomp;
+		}
+	      }
+	      var = var->next;
+	    }
+	    ifunc=G__struct.memfunc[i];
+	    while(ifunc) {
+	      for(ifn=0;ifn<ifunc->allifunc;ifn++) {
+		if(ifunc->pentry[ifn]&&ifunc->pentry[ifn]->filenum==ifile) {
+		  ifunc->globalcomp[ifn] = globalcomp;
+		}
+	      }
+	      ifunc = ifunc->next;
+	    }
+#endif
 	    G__struct.globalcomp[i]=globalcomp;
 	    /* Note this make the equivalent of '+' the
 	       default for defined_in type of linking */
@@ -9291,8 +9548,9 @@ G__value *buf;
 float* G__Floatref(buf)
 G__value *buf;
 {
-  if('f'==buf->type && buf->ref) 
+  if('f'==buf->type && buf->ref) {
     return((float*)buf->ref);
+  }
   else if('d'==buf->type || 'f'==buf->type) 
     buf->obj.fl = (float)buf->obj.d;
   else 
diff --git a/cint/src/v6_pause.cxx b/cint/src/v6_pause.cxx
index 15fb9c0acb0cb6d7c5e935dbd91ac0a948e73510..2e742c4acd8e042de6d747e03e4cbcc296e8a5c1 100644
--- a/cint/src/v6_pause.cxx
+++ b/cint/src/v6_pause.cxx
@@ -1473,7 +1473,7 @@ char *pipefile;
 	  G__serr = fopen(filename,openmode);
 	  break;
 #ifndef G__OLDIMPLEMENTATION1722
-	case G__NUM_STDERR: /* stderr */
+	case G__NUM_STDBOTH: /* stdout & stderr */
 	  *psout = G__sout;
 	  *pserr = G__serr;
 	  G__sout = fopen(filename,openmode);
diff --git a/cint/src/v6_pcode.cxx b/cint/src/v6_pcode.cxx
index fbb196c8bd5da4fad659424439ca6f8452e1a68c..bb68d14a50617b76211499f00442e5a74d398547 100644
--- a/cint/src/v6_pcode.cxx
+++ b/cint/src/v6_pcode.cxx
@@ -927,7 +927,23 @@ long localmem;
       for(i=0;i<fpara.paran;i++) {
 	fpara.para[i]=G__asm_stack[sp-fpara.paran+i];
 #ifndef G__OLDIMPLEMENTATION724
-	if(0==fpara.para[i].ref) fpara.para[i].ref=(long)(&fpara.para[i].obj);
+	if(0==fpara.para[i].ref) {
+#ifndef G__OLDIMPLEMENTATION1726
+	  switch(fpara.para[i].type) {
+	  case 'f':
+	  case 'b':
+	  case 'c':
+	  case 'r':
+	  case 's':
+	    break;
+	  default:
+	    fpara.para[i].ref=(long)(&fpara.para[i].obj);
+	    break;
+	  }
+#else
+	  fpara.para[i].ref=(long)(&fpara.para[i].obj);
+#endif
+	}
 #endif
       }
       sp-=fpara.paran;
diff --git a/cint/src/v6_pragma.cxx b/cint/src/v6_pragma.cxx
index f637b7ab0e5cd66a8126ce44e9efff22a0227e4b..f1f5b6f1f0625d7adf4e0aae8c8eeed01b8e89cb 100644
--- a/cint/src/v6_pragma.cxx
+++ b/cint/src/v6_pragma.cxx
@@ -97,7 +97,15 @@ int *pmode;
   char command[G__ONELINE];
   c=G__fgetstream(command,";\n\r");
   if(strcmp(command,"on")==0||'\0'==command[0]) *pmode=1;
-  else if(strcmp(command,"off")==0) *pmode=0;
+  else if(strcmp(command,"ON")==0)              *pmode=1;
+  else if(strcmp(command,"off")==0)             *pmode=0;
+  else if(strcmp(command,"OFF")==0)             *pmode=0;
+#ifdef G__NEVER
+  else if(strcmp(command,"always")==0)          *pmode=2;
+  else if(strcmp(command,"ALWAYS")==0)          *pmode=2;
+  else if(strcmp(command,"all")==0)             *pmode=3;
+  else if(strcmp(command,"ALL")==0)             *pmode=3;
+#endif
   else                              *pmode=G__int(G__getexpr(command));
   return(c);
 }
@@ -782,8 +790,12 @@ FILE *fp;
       fprintf(fp,"%s\n",arg[0]);
     }
   }
+#ifndef G__OLDIMPLEMENTATON1724
+  return(EXIT_SUCCESS);
+#else
   G__genericerror("Error: '#pragma endcompile' not found");
   return(EXIT_FAILURE);
+#endif
 }
 /**************************************************************************
 * G__isautoccupdate()
diff --git a/cint/src/v6_struct.cxx b/cint/src/v6_struct.cxx
index 04e93a7e74bdaf7435b2136f8b522838db14b63c..f78f49f3a7b1e403c23956c725ed8f5717491758 100644
--- a/cint/src/v6_struct.cxx
+++ b/cint/src/v6_struct.cxx
@@ -91,6 +91,13 @@ int G__using_namespace()
        ) return 1;
 #endif
     basetagnum = G__defined_tagname(buf,2);
+#ifndef G__OLDIMPLEMENTATION1732
+    if(-1==basetagnum) {
+      G__fprinterr(G__serr,"Error: namespace %s is not defined",buf);
+      G__genericerror((char*)NULL);
+      return(0);
+    }
+#endif
     if(G__def_struct_member) {
       /* using directive in other namespace or class/struct */
       envtagnum=G__get_envtagnum();
@@ -622,6 +629,28 @@ int noerror;
   }
 #endif
 
+#ifndef G__OLDIMPLEMENTATION1735
+  /* search for typename */
+  store_var_type = G__var_type;
+  i=G__defined_typename(tagname);
+  G__var_type=store_var_type;
+  if(-1!=i) {
+    i=G__newtype.tagnum[i];
+    if(-1!=i) return(i);
+  }
+#ifndef G__OLDIMPLEMENTATION957
+  {
+    int i2=0,cx;
+      while((cx=tagname[i2++])) if(G__isoperator(cx)) return(-1);
+  }
+#endif
+  /* not found */
+  if(noerror==0) {
+    G__fprinterr(G__serr,
+	    "Error: class,struct,union or type %s not defined " ,tagname);
+    G__genericerror((char*)NULL);
+  }
+#else /* 1735 */
   /* not found */
   if(noerror==0) {
 #ifndef G__OLDIMPLEMENTATION957
@@ -641,6 +670,7 @@ int noerror;
 	    "Error: class,struct,union or type %s not defined " ,tagname);
     G__genericerror((char*)NULL);
   }
+#endif /* 1735 */
   return(-1);
 
 }
@@ -1069,6 +1099,8 @@ char type;
     G__genericerror((char*)NULL);
   }
 #endif
+
+ doitagain:
   
   /*
    * [struct|union|enum]   tagname{ member }  item ;
@@ -1103,7 +1135,23 @@ char type;
     }
   }
   else if(c==':') {
+#ifndef G__OLDIMPLEMENTATION1733
+    /* inheritance or nested class */
+    c = G__fgetc();
+    if(':'==c) {
+      strcat(tagname,"::");
+      len=strlen(tagname);
+      c=G__fgetname_template(tagname+len,"{:;=&");
+      goto doitagain;
+    }
+    else {
+      fseek(G__ifile.fp,-1,SEEK_CUR);
+      if(G__dispsource) G__disp_mask=1;
+      c=':';
+    }
+#else
     /* inheritance */
+#endif
   }
   else if(c==';') {
     /* tagname declaration */
diff --git a/cint/src/v6_tmplt.cxx b/cint/src/v6_tmplt.cxx
index 6e544e4bf72c9a3f4f9eafa7cfbe23c0170f3e77..a19bc5e783ce2966b060ab58061676b97c83365a 100644
--- a/cint/src/v6_tmplt.cxx
+++ b/cint/src/v6_tmplt.cxx
@@ -2152,7 +2152,11 @@ char *tagnamein;
   }
 
 #ifndef G__OLDIMPLEMENTATION682
-  if(-1!=scope_tagnum) {
+  if(-1!=scope_tagnum
+#ifndef G__OLDIMPLEMENTATION1736
+     || ':'==templatename[0]
+#endif
+     ) {
     int i=0;
     char *p = strrchr(templatename,':');
 #ifndef G__OLDIMPLEMENTATION778
@@ -3363,6 +3367,9 @@ int funcmatch;
 #ifndef G__OLDIMPLEMENTATION812
   struct G__ifunc_table *ifunc;
 #endif
+#ifndef G__OLDIMPLEMENTATION1728
+  char *pexplicitarg;
+#endif
 #ifndef G__OLDIMPLEMENTATION687
   int env_tagnum=G__get_envtagnum();
   struct G__inheritance *baseclass;
@@ -3378,6 +3385,17 @@ int funcmatch;
   if(0==baseclass->basen) baseclass = (struct G__inheritance*)NULL;
 #endif
 
+#ifndef G__OLDIMPLEMENTATION1728
+  if(/* 0==libp->paran && */ (pexplicitarg=strchr(funcname,'<'))) {
+    /* funcname="f<int>" ->  funcname="f" , pexplicitarg="int>" */
+    int tmp=0;
+    *pexplicitarg = 0;
+    ++pexplicitarg;
+    G__hash(funcname,hash,tmp);
+  }
+  /* else pexplicitarg==NULL */
+#endif
+
   call_para.string = (char*)NULL;
   call_para.next = (struct G__Charlist*)NULL;
   deftmpfunc = &G__definedtemplatefunc;
@@ -3386,7 +3404,11 @@ int funcmatch;
   while(deftmpfunc->next) {
     G__freecharlist(&call_para);
     if(deftmpfunc->hash==hash && strcmp(deftmpfunc->name,funcname)==0 &&
-       G__matchtemplatefunc(deftmpfunc,libp,&call_para,funcmatch)) {
+       (G__matchtemplatefunc(deftmpfunc,libp,&call_para,funcmatch)
+#ifndef G__OLDIMPLEMENTATION1728
+	|| pexplicitarg
+#endif
+	)) {
 
 #ifndef G__OLDIMPLEMENTATION687
       if(-1!=deftmpfunc->parent_tagnum &&
@@ -3409,9 +3431,37 @@ int funcmatch;
       G__friendtagnum = deftmpfunc->friendtagnum;
 #endif
 
+#ifndef G__OLDIMPLEMENTATION1728
+      if(pexplicitarg) {
+	int npara=0;
+	G__gettemplatearglist(pexplicitarg,&call_para
+			      ,deftmpfunc->def_para,&npara);
+      }
+#endif
+
+#ifndef G__OLDIMPLEMENTATION1728
+      if(pexplicitarg) {
+	int tmp=0;
+	char *p = pexplicitarg-1;
+	pexplicitarg = (char*)malloc(strlen(funcname)+1);
+	strcpy(pexplicitarg,funcname);
+	*p = '<';
+	G__hash(funcname,hash,tmp);
+      }
+      else {
+	pexplicitarg = "";
+      }
+#endif
+
       /* matches funcname and parameter,
        * then expand the template and parse as prerun */
-      G__replacetemplate("",funcname
+      G__replacetemplate(
+#ifndef G__OLDIMPLEMENTATION1728
+			 pexplicitarg
+#else
+			 ""
+#endif
+			 ,funcname
 			 ,&call_para /* needs to make this up */
 			 ,deftmpfunc->def_fp
 			 ,deftmpfunc->line
@@ -3429,6 +3479,12 @@ int funcmatch;
       G__friendtagnum = store_friendtagnum;
 #endif
 
+#ifndef G__OLDIMPLEMENTATION1728
+      if(pexplicitarg && pexplicitarg[0]) {
+	free((void*)pexplicitarg);
+      }
+#endif
+
       /* call the expanded template function */
 #ifndef G__OLDIMPLEMENTATION712
       store_exec_memberfunc = G__exec_memberfunc;
diff --git a/cint/src/v6_var.cxx b/cint/src/v6_var.cxx
index 3dda0a7a6803af7a44238d02447f36866088f681..1ebccbaa7777fabe5282f9ec76c9b2c20d0310b8 100644
--- a/cint/src/v6_var.cxx
+++ b/cint/src/v6_var.cxx
@@ -3791,6 +3791,10 @@ struct G__var_array *varglobal,*varlocal;
 	*known2=1;
 #ifndef G__OLDIMPLEMENTATION1175
 	result = G__null;
+#ifndef G__OLDIMPLEMENTATION1737
+	result.tagnum = var->p_tagtable[ig15];
+	result.typenum = var->p_typetable[ig15];
+#endif
         switch(G__var_type) {
 	case 'p':
           if(var->paran[ig15]<=paran) {
diff --git a/cint/src/var.c b/cint/src/var.c
index 3dda0a7a6803af7a44238d02447f36866088f681..1ebccbaa7777fabe5282f9ec76c9b2c20d0310b8 100644
--- a/cint/src/var.c
+++ b/cint/src/var.c
@@ -3791,6 +3791,10 @@ struct G__var_array *varglobal,*varlocal;
 	*known2=1;
 #ifndef G__OLDIMPLEMENTATION1175
 	result = G__null;
+#ifndef G__OLDIMPLEMENTATION1737
+	result.tagnum = var->p_tagtable[ig15];
+	result.typenum = var->p_typetable[ig15];
+#endif
         switch(G__var_type) {
 	case 'p':
           if(var->paran[ig15]<=paran) {
diff --git a/cint/tool/makecint.c b/cint/tool/makecint.c
index 65ebcdd600c6c1e9a50e2e7c8230a0abb8238c91..ddc854e623a01612d8860da8a169b95af64a1ed5 100644
--- a/cint/tool/makecint.c
+++ b/cint/tool/makecint.c
@@ -93,6 +93,7 @@ enum G__MODE { G__IDLE, G__CHEADER, G__CSOURCE, G__CPPHEADER, G__CPPSOURCE
 enum G__PRINTMODE { G__PRINTOBJECT, G__PRINTSTRING , G__PRINTOBJECT_WPLUS
 		      , G__PRINTOBJECT_WSRC };
 
+
 /**************************************************************************
 * Path separator
 **************************************************************************/