bugGNU Octave - Bugs: bug #54504, signal package has namespace...

 
 

bug #54504: signal package has namespace conflict with "truncate", the libc function

Submitter:  None
Submitted:  Sun 12 Aug 2018 05:34:12 PM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Maya Rashish Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.4.1
Operating System:  * BSD Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 12 Aug 2018 09:58:31 PM UTC, comment #1: 

Thank you very much for this patch. I slightly modified the new names used for the enumerators, reworded the commit message, and pushed this patch under your name to the repository for the next bug fix release:

http://hg.code.sf.net/p/octave/signal/rev/e3ec5b3f92d5

I then made a further change to rename the names of both of the enumerated types, enumerators, and variables to improve consistency and readability:

http://hg.code.sf.net/p/octave/signal/rev/9348d7e3f124

Thanks for testing the signal package on BSD and for your valuable contribution.

I think a bug fix release will be coming soon, since we have now fixed build failures on Windows and BSD (and probably macOS by extension).

Mike Miller <mtmiller>
Group Member
Sun 12 Aug 2018 05:34:12 PM UTC, original submission:  

When building the signal

medfilt1.cc:40:27: error: ‘truncate’ redeclared as different kind of symbol
 enum pad_type { zero_pad, truncate };
                           ^~~~~~~~
In file included from /usr/include/stdlib.h:41:0,
                 from /usr/include/g++/cstdlib:75,
                 from /usr/include/g++/bits/stl_algo.h:59,
                 from /usr/include/g++/algorithm:62,
                 from /usr/pkg/include/octave-4.4.1/octave/Array.h:33,
                 from /usr/pkg/include/octave-4.4.1/octave/Array-util.h:28,
                 from /usr/pkg/include/octave-4.4.1/octave/MSparse.h:29,
                 from /usr/pkg/include/octave-4.4.1/octave/MatrixType.h:29,
                 from /usr/pkg/include/octave-4.4.1/octave/mx-base.h:30,
                 from /usr/pkg/include/octave-4.4.1/octave/Matrix.h:31,
                 from /usr/pkg/include/octave-4.4.1/octave/oct.h:30,
                 from medfilt1.cc:34:
/usr/include/sys/types.h:247:6: note: previous declaration ‘int truncate(const char*, __off_t)’
 int  truncate(const char *, off_t);
      ^~~~~~~~
medfilt1.cc: In function ‘octave_value_list Fmedfilt1(const octave_value_list&, int)’:
medfilt1.cc:326:19: error: cannot convert ‘int(const char*, __off_t) {aka int(const char*, long int)}’ to ‘pad_type’ in assignment
         padding = truncate;
                   ^~~~~~~~
gmake: * [medfilt1.oct] Error 1
gmake: * Waiting for unfinished jobs....

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #44768:  signal.diff added by None (2KiB - text/x-patch - patch to use uppercase TRUNCATE and ZERO_PAD, resolves this problem.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-08-12 mtmiller StatusNone Fixed
        Open/ClosedOpen Closed
    2018-08-12 None Attached File- Added signal.diff, #44768

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code