--- aplus-fsf-4.22.1.orig/src/MSTypes/MSBuiltinTypeVectorInlines.C +++ aplus-fsf-4.22.1/src/MSTypes/MSBuiltinTypeVectorInlines.C @@ -77,7 +77,7 @@ template INLINELINKAGE MSBuiltinVector MSBuiltinVector::operator[] (const MSBinaryVector & bVect_) const { - return compress (*this, bVect_); + return this->compress (*this, bVect_); } --- aplus-fsf-4.22.1.orig/src/MSTypes/MSFloat.C +++ aplus-fsf-4.22.1/src/MSTypes/MSFloat.C @@ -111,7 +111,8 @@ MSError::ErrorStatus MSFloat::internalSet(const char *pString_) { - char *np,buf[512]; + const char*np; + char buf[512]; _real=0.0; _flags=MSFloat::Set; // clear the Valid bit, i.e. isValid==MSFalse @@ -128,7 +129,7 @@ { return (MSError::BadReal); } // Disallow leading commas // Make sure we don't save too many characters after the decimal - char *decimal=strchr(pString_,'.'); + const char *decimal=strchr(pString_,'.'); if ((decimal!=0)&&(strlen(decimal+1)>MSRealMaximumLength)) { return (MSError::IntTooBig); } strcpy(buf,pString_); --- aplus-fsf-4.22.1.orig/src/MSTypes/MSObjectTypeVectorInlines.C +++ aplus-fsf-4.22.1/src/MSTypes/MSObjectTypeVectorInlines.C @@ -87,7 +87,7 @@ template INLINELINKAGE MSObjectVector MSObjectVector::operator[] (const MSBinaryVector & bVect_) const { - return compress (*this, bVect_); + return this->compress (*this, bVect_); } --- aplus-fsf-4.22.1.orig/src/MSTypes/MSObservableTree.C +++ aplus-fsf-4.22.1/src/MSTypes/MSObservableTree.C @@ -94,7 +94,7 @@ void MSObservableTree::removeSubtree(const MSTabularTreeCursor& cursor_) { MSTabularTreeCursor cursor2(cursor_); - unsigned long pos=position(cursor2); + unsigned long pos=this->position(cursor2); cursor2.setToParent(); MSTabularTree::removeSubtree(cursor_); if (cursor2.isValid()) changed(cursor2,pos,MSObservableTreeDelete); @@ -162,7 +162,7 @@ void MSObservableTree::replaceAt(MSTabularTreeCursor const& cursor_,Element const& element_) { MSTabularTree::replaceAt(cursor_,element_); - changed(cursor_,position(cursor_),MSObservableTreeAssign); + changed(cursor_,this->position(cursor_),MSObservableTreeAssign); } template @@ -170,10 +170,10 @@ { if (&tree_!=this) { - if (isRoot(cursor_)) copy(tree_); + if (this->isRoot(cursor_)) copy(tree_); else { - unsigned long pos=position(cursor_); + unsigned long pos=this->position(cursor_); MSTabularTreeCursor cursor=cursor_; cursor.setToParent(); MSTabularTree::removeSubtree(cursor_); @@ -199,7 +199,7 @@ template void MSObservableTree::elementChanged(MSTabularTreeCursor const& cursor_) { - changed(cursor_,position(cursor_),MSObservableTreeAssign); + changed(cursor_,this->position(cursor_),MSObservableTreeAssign); } template --- aplus-fsf-4.22.1.orig/src/MSTypes/MSTypeData.H +++ aplus-fsf-4.22.1/src/MSTypes/MSTypeData.H @@ -9,6 +9,7 @@ // /////////////////////////////////////////////////////////////////////////////// +#include #ifndef MSDefinesHEADER #include --- aplus-fsf-4.22.1.orig/src/MSTypes/MSUtil.C +++ aplus-fsf-4.22.1/src/MSTypes/MSUtil.C @@ -25,7 +25,7 @@ void MSUtil::comma(const char *fromBuffer_,char *toBuffer_,int size_) { int places,len,i,j; - char *cp; + const char *cp; if ((cp=strchr(fromBuffer_,'.'))!=NULL) { --- aplus-fsf-4.22.1.orig/src/a/bstub.c +++ aplus-fsf-4.22.1/src/a/bstub.c @@ -49,13 +49,14 @@ { int rc; pthread_mutexattr_t mattr; + pthread_mutexattr_init(&mattr); if(0!=(rc=pthread_mutexattr_settype(&mattr, PTHREAD_MUTEX_ADAPTIVE_NP))) { perror("initMutex():pthread_mutexattr_settype"); } if (rc==0 && pthread_mutex_init(&memStats_lock, &mattr)) { - perror("initMutex():thread_mutex_init"); + perror("initMutex():pthread_mutex_init"); } return 0; } --- aplus-fsf-4.22.1.orig/src/a/k.c +++ aplus-fsf-4.22.1/src/a/k.c @@ -18,7 +18,9 @@ #include #include #include -I MY[2001]; + +#define MYSIZE 30001 +I MY[MYSIZE]; CX Rx,Cx; extern void *Glbrtn ; extern I Xf; @@ -139,7 +141,7 @@ #else aplusPageMask=getpagesize()-1; #endif - X=Y=XY=(K=MY)+2000; + X=Y=XY=(K=MY)+(MYSIZE-1); *X=*K=0; *++K=0; symhti(); --- aplus-fsf-4.22.1.orig/src/a/u.c +++ aplus-fsf-4.22.1/src/a/u.c @@ -157,13 +157,14 @@ { int rc; pthread_mutexattr_t mattr; + pthread_mutexattr_init(&mattr); if(0!=(rc=pthread_mutexattr_settype(&mattr, PTHREAD_MUTEX_ADAPTIVE_NP))) { perror("initMutex():pthread_mutexattr_settype"); } if (rc==0 && pthread_mutex_init(&newSymbol_lock, &mattr)) { - perror("initMutex():thread_mutex_init"); + perror("initMutex():pthread_mutex_init"); } return 0; } --- aplus-fsf-4.22.1.orig/src/cxs/s.+ +++ aplus-fsf-4.22.1/src/cxs/s.+ @@ -4206,6 +4206,8 @@ { kûsys.readmat{f0}; if (()½k) kûsys.readmat{f1}; + ã Remove comment lines. + kû(Ø'!'¨¡1Ù¡(' '¨¡<@1k)/¡<@1k)/k; zû13Õ@1 k; zûszÒz Ý ((z=TAB)/z)û' ' Ý zû,z Ý szûÒz; zû((z=' ')É@1Û0)÷@0 1 z; @@ -5958,8 +5960,8 @@ `sâ'DEFAULT_COLOR:bDefaultPixelValue{}'; `sâ'DEFAULT_FONT:bDefaultFontValue{}'; - s.COLOR_FILEû'/usr/local/X11/lib/rgb.txt'; - s.COLOR_FILE1û'/usr/local/X11R5/lib/rgb.txt'; + s.COLOR_FILEû'/etc/X11/rgb.txt'; + s.COLOR_FILE1û'/usr/share/X11/rgb.txt'; `sâ'COLOR_INFORMATION:color_information{COLOR_FILE;COLOR_FILE1}'; `sâ'COLOR_NAMES:0ØCOLOR_INFORMATION'; --- aplus-fsf-4.22.1.orig/src/dap/sgnlcatch.c +++ aplus-fsf-4.22.1/src/dap/sgnlcatch.c @@ -34,7 +34,7 @@ if ((n >= 1) && (n < NSIG)) { struct sgnl *p = sgnls + n; -#if defined(HAVE_SVR4) +#if defined(HAVE_SIGACTION) struct sigaction *ovp; struct sigaction vec; ovp = (p->set == 0) ? &(p->orig) : (struct sigaction *) (0); --- aplus-fsf-4.22.1.orig/src/dap/sgnldefault.c +++ aplus-fsf-4.22.1/src/dap/sgnldefault.c @@ -20,7 +20,7 @@ if ((n >= 1) && (n < NSIG)) { struct sgnl *p = sgnls + n; -#if defined(HAVE_SVR4) +#if defined(HAVE_SIGACTION) struct sigaction *ovp; struct sigaction vec; --- aplus-fsf-4.22.1.orig/src/dap/sgnlignore.c +++ aplus-fsf-4.22.1/src/dap/sgnlignore.c @@ -20,7 +20,7 @@ if ((n >= 1) && (n < NSIG)) { struct sgnl *p = sgnls + n; -#if defined(HAVE_SVR4) +#if defined(HAVE_SIGACTION) struct sigaction *ovp; struct sigaction vec; --- aplus-fsf-4.22.1.orig/src/dap/sgnloriginal.c +++ aplus-fsf-4.22.1/src/dap/sgnloriginal.c @@ -22,7 +22,7 @@ struct sgnl *p = sgnls + n; if (p->set != 0) { -#if defined(HAVE_SVR4) +#if defined(HAVE_SIGACTION) struct sigaction *ovp = &(p->orig); if (sigaction(n, ovp, (struct sigaction *) (0)) != 0) { --- aplus-fsf-4.22.1.orig/src/dap/sgnlproc.c +++ aplus-fsf-4.22.1/src/dap/sgnlproc.c @@ -17,7 +17,7 @@ { int n; struct sgnl *p; -#if defined(HAVE_SVR4) +#if defined(HAVE_SIGACTION) sigset_t savemask; struct sigaction act; #else @@ -27,7 +27,7 @@ for (n = 1; n < NSIG; n++) { if ((p = sgnls + n)->flag) { -#if defined(HAVE_SVR4) +#if defined(HAVE_SIGACTION) sigaction(n, NULL, &act); savemask = act.sa_mask; sigemptyset(&act.sa_mask); --- aplus-fsf-4.22.1.orig/src/esf/fmt.c +++ aplus-fsf-4.22.1/src/esf/fmt.c @@ -24,6 +24,9 @@ #include #include +/* shadowed declaration for C++ function */ +void *ga(long t,long r,long n,long *d); + #define DATAINC 100 /* Token types */ --- aplus-fsf-4.22.1.orig/src/esf/primpro.c +++ aplus-fsf-4.22.1/src/esf/primpro.c @@ -13,6 +13,9 @@ #include #include +/* shadowed declaration for C++ function */ +void *gi(long i); + #define NUM_TYPES 4 #define NUM_BUCKETS 9 #define NUM_CPU_BUCKETS 2