Changeset 13921 in project for chicken


Ignore:
Timestamp:
03/25/09 11:16:09 (11 years ago)
Author:
felix winkelmann
Message:

chicken-bug attempts several tries to connect; reordered compiler switch settings in Makefile.macosx

Location:
chicken/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/Makefile.macosx

    r12937 r13921  
    5858APPLY_HACK_OBJECT = apply-hack.$(ARCH)$(O)
    5959
     60# architectures
     61
     62ifeq ($(ARCH),x86-64)
     63C_COMPILER_OPTIONS += -m64
     64LINKER_OPTIONS += -m64
     65else
     66
     67ifeq ($(ARCH),universal)
     68C_COMPILER_OPTIONS += -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
     69LINKER_OPTIONS += -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
     70
     71ifneq ($(HACKED_APPLY),)
     72# We undefine HACKED_APPLY in order to override rules.make.
     73HACKED_APPLY=
     74apply-hack.ppc.darwin$(O): apply-hack.ppc.darwin.s
     75        as -arch ppc -o $@ $<
     76apply-hack.x86$(O): apply-hack.x86.s
     77        as -arch i386 -o $@ $<
     78$(APPLY_HACK_OBJECT): apply-hack.x86$(O) apply-hack.ppc.darwin$(O)
     79        lipo -create -output $(APPLY_HACK_OBJECT) $^
     80endif
     81endif
     82endif
     83
    6084# select default and internal settings
    6185
     
    103127        cat chicken-defaults.h >>$@
    104128
    105 # architectures
    106 
    107 ifeq ($(ARCH),x86-64)
    108 C_COMPILER_OPTIONS += -m64
    109 LINKER_OPTIONS += -m64
    110 else
    111 
    112 ifeq ($(ARCH),universal)
    113 C_COMPILER_OPTIONS += -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
    114 LINKER_OPTIONS += -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
    115 
    116 ifneq ($(HACKED_APPLY),)
    117 # We undefine HACKED_APPLY in order to override rules.make.
    118 HACKED_APPLY=
    119 apply-hack.ppc.darwin$(O): apply-hack.ppc.darwin.s
    120         as -arch ppc -o $@ $<
    121 apply-hack.x86$(O): apply-hack.x86.s
    122         as -arch i386 -o $@ $<
    123 $(APPLY_HACK_OBJECT): apply-hack.x86$(O) apply-hack.ppc.darwin$(O)
    124         lipo -create -output $(APPLY_HACK_OBJECT) $^
    125 endif
    126 
    127 endif
    128 endif
    129 
    130129include $(SRCDIR)/rules.make
  • chicken/trunk/chicken-bug.scm

    r13874 r13921  
    3535(define-constant +destination+ "chicken-janitors@nongnu.org")
    3636(define-constant +mxservers+ (list "mx10.gnu.org" "mx20.gnu.org"))
     37(define-constant +send-tries+ 3)
    3738
    3839(define-foreign-variable +cc+ c-string "C_TARGET_CC")
     
    239240
    240241(define (send-mail serv msg hdrs fname)
    241   (print "connecting to " serv " ...")
    242     (receive (i o)
    243         (tcp-connect serv 25)
    244         (call-with-current-continuation
    245             (lambda (k)
    246                 (mail-check i o (mail-read i o) 220 k)
    247                 (mail-check i o (mail-write i o "HELO callcc.org\r\n") 250 k)
    248                 (mail-check i o (mail-write i o "MAIL FROM:<chicken-bug-command@callcc.org>\r\n") 250 k)
    249                 (mail-check i o (mail-write i o "RCPT TO:<chicken-janitors@nongnu.org>\r\n") 250 k)
    250                 (mail-check i o (mail-write i o "DATA\r\n") 354 k)
    251                 (mail-check i o (mail-write i o (string-append hdrs fname "\r\n\r\n" msg "\r\n.\r\n")) 250 k)
    252                 (display "QUIT" o)
    253                 (close-input-port i)
    254                 (close-output-port o)
    255                 (print "Bug report successfully mailed to the Chicken maintainers.\nThank you very much!\n\n")
    256                 #t))))
     242  (call/cc
     243   (lambda (return)
     244     (do ((try 1 (add1 try)))
     245         ((> try +send-tries+))
     246       (print* "connecting to " serv ", try #" try " ...")
     247       (receive (i o)
     248           (tcp-connect serv 25)
     249         (call-with-current-continuation
     250          (lambda (k)
     251            (mail-check i o (mail-read i o) 220 k)
     252            (mail-check i o (mail-write i o "HELO callcc.org\r\n") 250 k)
     253            (mail-check i o (mail-write i o "MAIL FROM:<chicken-bug-command@callcc.org>\r\n") 250 k)
     254            (mail-check i o (mail-write i o "RCPT TO:<chicken-janitors@nongnu.org>\r\n") 250 k)
     255            (mail-check i o (mail-write i o "DATA\r\n") 354 k)
     256            (mail-check i o (mail-write i o (string-append hdrs fname "\r\n\r\n" msg "\r\n.\r\n")) 250 k)
     257            (display "QUIT" o)
     258            (close-input-port i)
     259            (close-output-port o)
     260            (print "ok.\n\nBug report successfully mailed to the Chicken maintainers.\nThank you very much!\n\n")
     261            (return #t))))
     262       (print " failed.")))))
    257263
    258264(main (command-line-arguments))
Note: See TracChangeset for help on using the changeset viewer.