bugGNU Mailutils - Bugs: bug #26578, Compilation issues with gcc 2.95.3...

 
 

bug #26578: Compilation issues with gcc 2.95.3 - (patches to fix included)

Submitted by:  None
Submitted on:  Thu 14 May 2009 04:47:02 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Sergey Poznyakoff <gray>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 09 Feb 2010 11:20:51 AM UTC, comment #1:

Fixed (commit 5f97b649). Thank you.

Sergey Poznyakoff <gray>
Project AdministratorIn charge of this item.
Thu 14 May 2009 04:47:02 PM UTC, original submission:

There are a few compilation problems when compiled with gcc version 2.95.3 (admittedly, a rather aged version
of gcc). These are all minor issues with declaration syntax.

The files affected are:
libproto/pop/mbox.c
libproto/imap/folder.c
imap4d/id.c
sieve/sieve.c

Below are the output messages from the compilation failures and patches for each file that successfully correct the issues.

With these patches in place, the package compiles OK.

Could these changes be rolled into the source?

Thanks,

Granville Moore

Details
-------

libproto/pop/mbox.c
-------------------
mbox.c: In function `pop_writer':
mbox.c:672: parse error before `int'
mbox.c:673: `status' undeclared (first use in this function)
mbox.c:673: (Each undeclared identifier is reported only once
mbox.c:673: for each function it appears in.)

This is corrected by inserting a declaration for "status" and removing the in-line
declaration.

Patch:
---------------------------------------------------------------

      • mbox.c.buggy Mon Dec 8 19:06:08 2008

--- mbox.c Thu May 14 15:01:03 2009
***************

      • 667,675 ****

static int
pop_writer (void iodata, char buf)
{
pop_data_t iop = iodata;
MU_DEBUG1 (iop->mbox->debug, MU_DEBUG_PROT, "%s\n", buf);
! int status = pop_writeline (iop, "%s\r\n", buf);
CHECK_ERROR (iop, status);
status = pop_write (iop);
CHECK_ERROR (iop, status);
--- 667,676 ----
static int
pop_writer (void iodata, char buf)
{
+ int status = 0;
pop_data_t iop = iodata;
MU_DEBUG1 (iop->mbox->debug, MU_DEBUG_PROT, "%s\n", buf);
! status = pop_writeline (iop, "%s\r\n", buf);
CHECK_ERROR (iop, status);
status = pop_write (iop);
CHECK_ERROR (iop, status);
-----------------------------------------------------------------------

libproto/imap/folder.c
----------------------
folder.c: In function `imap_writer':
folder.c:575: parse error before `int'
folder.c:577: `status' undeclared (first use in this function)
folder.c:577: (Each undeclared identifier is reported only once
folder.c:577: for each function it appears in.)

This is corrected by inserting a declaration for "status" and removing the in-line
declaration.

Patch:
-----------------------------------------------------------------

      • folder.c.buggy Mon Dec 8 19:06:08 2008

--- folder.c Thu May 14 15:25:29 2009
***************

      • 569,578 ****

static int
imap_writer (void iodata, char buf)
{
f_imap_t iop = iodata;
MU_DEBUG2 (iop->folder->debug, MU_DEBUG_PROT, "g%s %s\n",
mu_umaxtostr (0, iop->seq), buf);
! int status = imap_writeline (iop, "g%s %s\r\n",
mu_umaxtostr (0, iop->seq++), buf);
CHECK_ERROR (iop, status);
status = imap_send (iop);
--- 569,579 ----
static int
imap_writer (void iodata, char buf)
{
+ int status = 0;
f_imap_t iop = iodata;
MU_DEBUG2 (iop->folder->debug, MU_DEBUG_PROT, "g%s %s\n",
mu_umaxtostr (0, iop->seq), buf);
! status = imap_writeline (iop, "g%s %s\r\n",
mu_umaxtostr (0, iop->seq++), buf);
CHECK_ERROR (iop, status);
status = imap_send (iop);
----------------------------------------------------------------------

imap4d/id.c
-----------

id.c: In function `imap4d_id':
id.c:177: parse error before `int'
id.c:180: `i' undeclared (first use in this function)
id.c:180: (Each undeclared identifier is reported only once
id.c:180: for each function it appears in.)
id.c:196: `outcnt' undeclared (first use in this function)

This is corrected by moving the declaration of i and outcnt to the start
of the function.

Patch:
-------------------------------------------------------------------------

      • id.c.buggy Mon Dec 8 19:06:08 2008

--- id.c Thu May 14 16:02:28 2009
***************

      • 167,172 ****

--- 167,174 ----
int
imap4d_id (struct imap4d_command *command, imap4d_tokbuf_t tok)
{
+ int i;
+ int outcnt = 0;
int rc = eat_args (tok);
if (rc != RESP_OK)
return util_finish (command, rc, "Syntax error");
***************

      • 174,181 ****

{
mu_iterator_t itr;
mu_list_get_iterator (imap4d_id_list, &itr);
- int i;
- int outcnt = 0;

for (i = 0, mu_iterator_first (itr);
i < 30 && !mu_iterator_is_done (itr);
--- 176,181 ----
-------------------------------------------------------------------------

sieve/sieve.c
-------------

sieve.c: In function `cb_email':
sieve.c:278: parse error before `int'
sieve.c:279: `rc' undeclared (first use in this function)
sieve.c:279: (Each undeclared identifier is reported only once
sieve.c:279: for each function it appears in.)

This is corrected by inserting a declaration for "rc" and removing the in-line
declaration.

Patch:
-------------------------------------------------------------------------

      • sieve.c.buggy Tue Dec 23 21:54:52 2008

--- sieve.c Thu May 14 16:06:45 2009
***************

      • 273,281 ****

static int
cb_email (mu_debug_t debug, void data, mu_config_value_t val)
{
if (mu_cfg_assert_value_type (val, MU_CFG_STRING, debug))
return 1;
! int rc = mu_set_user_email (val->v.string);
if (rc)
mu_cfg_format_error (debug, MU_DEBUG_ERROR, _("Invalid email: %s"),
mu_strerror (rc));
--- 273,282 ----
static int
cb_email (mu_debug_t debug, void data, mu_config_value_t val)
{
+ int rc;
if (mu_cfg_assert_value_type (val, MU_CFG_STRING, debug))
return 1;
! rc = mu_set_user_email (val->v.string);
if (rc)
mu_cfg_format_error (debug, MU_DEBUG_ERROR, _("Invalid email: %s"),
mu_strerror (rc));
-------------------------------------------------------------------------

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by gray (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 09 Feb 2010 11:20:51 AM UTCgrayStatusNone=>Fixed
      Assigned toNone=>gray
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1