[Ecls-list] About name collisions

Juan Jose Garcia-Ripoll jjgarcia at users.sourceforge.net
Thu Jan 31 23:28:50 UTC 2008


I have just finished (but not yet committed) new code to change the
names of initialization functions in compiled code.

Until now we used init_**** where **** contains the file name of the
source. I propose to use
  (format nil "_ecl~36Rs~36Rt~36R" (get-universal-time) (incf
*counter*) (si::getpid))
where *counter* is an internal counter, and we use the universal time
and the process id to differentiate the binary.

Pros: simple, works for any source tree organization and any number of
compilations on the same machine; it will still work when the compiler
becomes threads safe and reentrant.

Contras: there may be collisions if the computer clock is wrong, or of
one tries to combine binaries built on two different machines.

I would like to hear your opinion, but keep in mind that function
names cannot be arbitrarily large, so hostnames, threads, etc,


Facultad de Fisicas, Universidad Complutense,
Ciudad Universitaria s/n Madrid 28040 (Spain)

More information about the ecl-devel mailing list