gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] The 12 ascii nul issue


From: Mike Thomas
Subject: [Gcl-devel] The 12 ascii nul issue
Date: Mon, 25 Mar 2002 14:58:13 +1000

Hi there.

> > > Just saying that Mike Thomas is not crazy for concluding that this
> > > was necessary. :-)

Actually just a tad inattentive:

Mingw32 GCL works with the twleve nul addition, but it is not used in the
build - not sure how I convinced myself of that. Here are the platforms for
which it is used in the GCL Makefiles:

========================================================
$ fgrep -r NULLFILE *
cmpnew/makefile:        "${APPEND} ${NULLFILE} $*.data $*.o"
cmpnew/makefile:        ${APPEND} ${NULLFILE} $*.data  $*.o
h/alpha-osf1.defs:NULLFILE = ../h/twelve_null
h/dec3100.defs:NULLFILE = ../h/twelve_null
h/dos-go32.defs:LSP2O_4=..\xbin\if-exists $(PORTDIR)\saved_gcl
..\xbin\append ${
NULLFILE} $*.data $*.o
h/dos-go32.defs:NULLFILE=
h/FreeBSD.defs:NULLFILE=../h/twelve_null
h/hp800.defs:NULLFILE = ../h/twelve_null
h/irix5.defs:NULLFILE = ../h/twelve_null
h/NetBSD.defs:NULLFILE=../h/twelve_null
h/OpenBSD.defs:NULLFILE=../h/twelve_null
h/sgi.defs:NULLFILE = ../h/twelve_null
h/sgi4d.defs:NULLFILE = ../h/twelve_null
h/solaris-i386.defs:NULLFILE = ../h/secondary_sun_magic
h/solaris.defs:NULLFILE = ../h/secondary_sun_magic
h/sun3-os4.defs:NULLFILE = ../h/secondary_sun_magic
h/sun4.defs:NULLFILE = ../h/secondary_sun_magic
lsp/makefile:   "${APPEND} ${NULLFILE} $*.data $*.o "
lsp/makefile:   ${APPEND} ${NULLFILE} $*.data  $*.o
unixport/makefile.dos:LSP2O_4=..\xbin\if-exists $(PORTDIR)\saved_kcl
..\xbin\app
end ${NULLFILE} $*.data $*.o
unixport/makefile.dos:NULLFILE=

========================================================

Here is the relevant lisp compiler platform dependent code in
"cmpnew/cmpmain.c":

========================================================
(defun compiler-build (o-pathname data-pathname)
  #+(and system-v (not e15))
  (safe-system (format nil "echo \"\\000\\000\\000\\000\" >> ~A"
                       (namestring o-pathname)))
    #+(or hp-ux sun sgi)
    (with-open-file (o-file
      (namestring o-pathname)
      :direction :output
      :if-exists :append)
      ; we could do a safe-system, but forking is slow on the Iris
    #+(or hp-ux (and sgi (not irix5)))
    (dotimes (i 12)
      (write-char #\^@ o-file))
    #+sun  ; we could do a safe-system, but forking is slow on the Iris
    (dolist (v '(0 0 4 16 0 0 0 0))
       (write-byte v o-file))

    )
  #-ld-not-accept-data
  (when (probe-file o-pathname)
     (nconc-files o-pathname data-pathname)
    #+never
    (safe-system (format nil
    "cat ~a  >> ~A"
    (namestring data-pathname)
    (namestring o-pathname)))))

========================================================

> I'm hoping that experimentation over the next twenty-four hours will prove
> that it isn't needed for Mingw32.  (See other email.)


So the long and the short of it is that this is not needed with Mingw32, and
presumably also not with Cygwin.

I still don't know why it is necessary.

It is presumably a porting pitfall though - as is the broken "-O4" hack,
which was the main problem for Mingw32; resolved with substitution of "-O2".
I have tried "-O3" by the way.  It doesn't work for Mingw32 GCL.

Cheers

Mike Thomas






reply via email to

[Prev in Thread] Current Thread [Next in Thread]