all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@CS.UCLA.EDU>
Subject: CVS Emacs problem with TRUE in src/image.c
Date: Tue, 07 Dec 2004 11:46:20 -0800	[thread overview]
Message-ID: <87r7m1vqlv.fsf@penguin.cs.ucla.edu> (raw)

When building GNU Emacs from CVS on Debian GNU/Linux 3.0r2 I ran into
the following problem:

   gcc -c -D_BSD_SOURCE   -Demacs -DHAVE_CONFIG_H   -I. -I/home/eggert/src/gnu/emacs-error/src -D_BSD_SOURCE -I/usr/X11R6/include -g -O2 image.c
   image.c: In function `Finit_image_library':
   image.c:7955: error: `TRUE' undeclared (first use in this function)
   image.c:7955: error: (Each undeclared identifier is reported only once
   image.c:7955: error: for each function it appears in.)
   image.c: In function `init_image':
   image.c:8117: error: `TRUE' undeclared (first use in this function)
   make[1]: *** [image.o] Error 1
   make[1]: Leaving directory `/home/eggert/src/gnu/emacs-error/src'
   make: *** [bootstrap-build] Error 2


Here is a trivial patch to src/image.c to work around the problem:

2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>

	* image.c (our_fill_input_buffer, jpeg_load, CHECK_LIB_AVAILABLE,
	init_image): Use 1 rather than TRUE, since TRUE isn't defined on
	Debian GNU/Linux 3.0r2.

--- image.c.~1.17.~	2004-12-03 09:00:11 -0800
+++ image.c	2004-12-07 11:35:11 -0800
@@ -6378,7 +6378,7 @@ our_fill_input_buffer (cinfo)
 
   src->next_input_byte = buffer;
   src->bytes_in_buffer = 2;
-  return TRUE;
+  return 1;
 }
 
 
@@ -6533,11 +6533,11 @@ jpeg_load (f, img)
     jpeg_memory_src (&cinfo, SDATA (specified_data),
 		     SBYTES (specified_data));
 
-  fn_jpeg_read_header (&cinfo, TRUE);
+  fn_jpeg_read_header (&cinfo, 1);
 
   /* Customize decompression so that color quantization will be used.
 	 Start decompression.  */
-  cinfo.quantize_colors = TRUE;
+  cinfo.quantize_colors = 1;
   fn_jpeg_start_decompress (&cinfo);
   width = img->width = cinfo.output_width;
   height = img->height = cinfo.output_height;
@@ -7552,7 +7552,7 @@ gif_load (f, img)
   bg_color.blue = color.blue;
   RGBBackColor (&bg_color);
   SetGWorld (old_port, old_gdh);
-  SetMovieActive (movie, TRUE);
+  SetMovieActive (movie, 1);
   SetMovieGWorld (movie, ximg, NULL);
   SampleNumToMediaTime (media, ino + 1, &time, NULL);
   SetMovieTimeValue (movie, time);
@@ -7930,7 +7930,7 @@ DEFUN ("lookup-image", Flookup_image, Sl
   define_image_type (image_type, init_lib_fn (libraries))
 #else
 #define CHECK_LIB_AVAILABLE(image_type, init_lib_fn, libraries) \
-  define_image_type (image_type, TRUE)
+  define_image_type (image_type, 1)
 #endif /* HAVE_NTGUI */
 
 DEFUN ("init-image-library", Finit_image_library, Sinit_image_library, 2, 2, 0,
@@ -8114,8 +8114,8 @@ init_image ()
 {
   image_types = NULL;
 
-  define_image_type (&xbm_type, TRUE);
-  define_image_type (&pbm_type, TRUE);
+  define_image_type (&xbm_type, 1);
+  define_image_type (&pbm_type, 1);
 
 #ifdef MAC_OS
   /* Animated gifs use QuickTime Movie Toolbox.  So initialize it here. */

                 reply	other threads:[~2004-12-07 19:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r7m1vqlv.fsf@penguin.cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.