Commits

Jed Brown committed cf4b33a

DLL: translate hyphens to dashes in basename for initializer

For example, when adding a library using

-dll_append /path/to/libfoo-bar.so

we now look for the initializer PetscDLLibraryRegister_foo_bar().

Comments (0)

Files changed (1)

   else {
     ierr = PetscInfo1(0,"Dynamic library %s does not have lib prefix\n",libname);CHKERRQ(ierr);
   }
+  for (s=basename; *s; s++) if (*s == '-') *s = '_';
   ierr = PetscStrlen(basename,&len);CHKERRQ(ierr);
   ierr = PetscStrcpy(registername,"PetscDLLibraryRegister_");CHKERRQ(ierr);
   ierr = PetscStrncat(registername,basename,len);CHKERRQ(ierr);