From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Ralf Fassel Newsgroups: gmane.emacs.bugs Subject: Re: `print' does not print Date: Mon, 25 Mar 2002 14:47:41 +0100 Organization: Akustik Technologie Goettingen Sender: bug-gnu-emacs-admin@gnu.org Message-ID: <15519.10877.452978.802301@jupiter.akutech-local.de> References: <15518.13685.866557.429681@jupiter.akutech-local.de> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1017064822 18386 127.0.0.1 (25 Mar 2002 14:00:22 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 25 Mar 2002 14:00:22 +0000 (UTC) Cc: rms@gnu.org, bug-gnu-emacs@gnu.org Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16pV1J-0004mR-00 for ; Mon, 25 Mar 2002 15:00:21 +0100 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16pV1I-0005BL-00; Mon, 25 Mar 2002 09:00:20 -0500 Original-Received: from delysid.gnu.org ([158.121.106.20]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16pUzb-000557-00; Mon, 25 Mar 2002 08:58:35 -0500 Original-Received: from mail.t-intra.de ([62.156.146.210]) by delysid.gnu.org with esmtp (Exim 3.34 #2) id 16pUzO-0001IC-00; Mon, 25 Mar 2002 08:58:22 -0500 Original-Received: from jupiter.akutech-local.de ([217.84.229.163]) by mail.t-intra.de with Microsoft SMTPSVC(5.5.1877.507.50); Mon, 25 Mar 2002 14:47:42 +0100 Original-Received: (from ralf@localhost) by jupiter.akutech-local.de (8.11.1/8.11.1) id g2PDlgY4542234; Mon, 25 Mar 2002 14:47:42 +0100 (MET) Original-To: Eli Zaretskii In-Reply-To: Errors-To: bug-gnu-emacs-admin@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.0.5 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.bugs:151 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:151 * Eli Zaretskii | Assuming for a moment that the problem is caused by some disruption | of memory allocation for the standard handles, one thing to try is | to use setvbuf to allocate a buffer for stdout, somewhere near the | beginning of `main'. Does that help? The code snipped I tried is: if (initialized) { if (setvbuf (stdout, stdout_buffer, _IOLBF, BUFSIZ)) { write(2, "setvbuf failed\n", 15); exit(1); } write (2,"setbuf ok\n",10); } where `stdout_buffer' was a global char[BUFSIZ] in emacs.c (malloc'ing it didn't make any difference). Didn't help - at the start of main in emacs.c, #737 just before calling `sort_args()' - at the end of main before calling `Frecursive_edit()' - in `printchar', where I had to trick a bit to invoke it only once at first invocation (reset a static init-var in main to 0, since that init-var was already initialized in the dumped emacs) - any variation of _IOFBF causes input/output to be fully buffered. _IOLBF causes output to be line buffered; the buffer will be flushed when a newline is written, the buffer is full, or input is requested. _IONBF causes input/output to be completely unbuffered. for the buffering. It also tried to use unbuffered I/O via setbuf() with a NULL pointer, didn't help either. It also did not help to freopen() stdout to some file at the same places. ========================================================= I then had a look what had actually changed in unexelf.c, and with the following diff applied to unexelf.c I can make it work again (i.e. disabling the SGI-specials introduced for the .got section): *** unexelf.c.21.2 Mon Jan 28 17:33:22 2002 --- unexelf.c Mon Mar 25 14:40:55 2002 *************** *** 1033,1038 **** --- 1033,1039 ---- ".lit4") || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name), ".lit8") + #if 0 #if __sgi /* According to David Kaelbling , the SGI-specific section below is required to avoid core *************** *** 1042,1047 **** --- 1043,1049 ---- || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name), ".got") #endif + #endif || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name), ".sdata1") || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name), *************** *** 1220,1228 **** --- 1222,1232 ---- ".lit4") || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name), ".lit8") + #if 0 #if __sgi || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name), ".got") + #endif #endif || !strcmp ((old_section_names + NEW_SECTION_H (nn).sh_name), ".sdata1") I did configure emacs as # ./configure --prefix=/software/emacs/21.2 # -exec-prefix=/software/emacs/21.2/IRIX-6 --with-pop # --with-x-toolkit=athena R'