bugGNU Enscript - Bugs: bug #64307, enscript does not compile on macOS...

 
 

bug #64307: enscript does not compile on macOS 13.4

Submitter:  None
Submitted:  Thu 15 Jun 2023 04:34:54 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 12 Feb 2024 09:55:53 PM UTC, comment #2: 

Should be fixed now.
Added the <string.h> to the getopt.c
Don't no why this has its own getopt version.
Probably historicly...

Wim Stockman <thinkerwim>
Group Member
Sun 18 Jun 2023 03:02:20 PM UTC, comment #1: 

Same problem on OpenBSD:
http://cvsweb.openbsd.org/ports/print/enscript/patches/patch-compat_getopt_c

Apparently, this has been known for 8 years.

Anonymous
Thu 15 Jun 2023 04:34:54 PM UTC, original submission:  

This is the current git on macOS, using clang 14.0.0.
After ./configure, make fails with

gcc -DHAVE_CONFIG_H -I. -I.. -I./../intl -I../intl  -I/usr/local/include  -g -O2 -c -o getopt.o getopt.c
getopt.c:527:30: error: implicitly declaring library function 'strcmp' with type 'int (const char , const char )' [-Werror,-Wimplicit-function-declaration]
      if (optind != argc && !strcmp (argv[optind], "--"))


and

getopt.c:603:7: error: implicitly declaring library function 'strncmp' with type 'int (const char , const char , unsigned long)' [-Werror,-Wimplicit-function-declaration]
        if (!strncmp (p->name, nextchar, nameend - nextchar))


and

getopt.c:606:21: error: implicitly declaring library function 'strlen' with type 'unsigned long (const char *)' [-Werror,-Wimplicit-function-declaration]
                == (unsigned int) strlen (p->name))


Adding #include <string.h> to compat/getopt.c fixes that.
(But why does enscript have its own buggy getopt in the first place?)

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #54843:  string.diff added by None (277B - application/octet-stream - add string.h to getopt.c)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by thinkerwim (Posted a comment)
  •  

    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 logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-02-12 thinkerwim StatusNone Fixed
        Open/ClosedOpen Closed
    2023-06-15 None Attached File- Added string.diff, #54843

    Back to the top

    Powered by Savane 3.12.
    Corresponding source code