Barry Smith <[email protected]> writes:

> PetscFunctionBegin;
>   /* dynamically allocate so valgrind and PETSc can check for overflow */
>   ierr = PetscMalloc(len,&buf);CHKERRQ(ierr);
>   ierr = PetscGetFullPath(path,buf,len);CHKERRQ(ierr);
>   ierr = PetscSNPrintf(cmd,sizeof cmd,"test $(realpath %s | head -c %d) = 
> %s",path,(int)len-1,buf);CHKERRQ(ierr);
>   if (system(cmd)) {
>     ierr = PetscPrintf(PETSC_COMM_SELF,"$(realpath %s | head -c %d) != 
> %s\n",path,(int)len-1,buf);CHKERRQ(ierr);
>   }
>   if (used) {ierr = PetscStrlen(buf,used);CHKERRQ(ierr);}
>   ierr = PetscFree(buf);CHKERRQ(ierr);
>   PetscFunctionReturn(0);
>
> 1)  realpath doesn't exist on Apple make alltests gives ugly shit below

Huh, I thought it was POSIX, but it looks like that's only the libc
function.  Will fix.

> 2) why is this using "system()" instead of PetscPOpen()? 

No good reason.

> 3) next appears to be a vast waste land of broken code, WTF?

Is there other stuff?  I find a new round of warnings every time I build
because a lot of people are using older

Attachment: pgp0sPmru7FYY.pgp
Description: PGP signature

Reply via email to