NSS certutil/keystuff.c cleanup for Solaris

RESOLVED FIXED in 3.32

Status

defect
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: petr.sumbera, Assigned: petr.sumbera)

Tracking

trunk
3.32

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Assignee

Description

2 years ago
User Agent: Mozilla/5.0 (X11; SunOS i86pc; rv:52.0) Gecko/20100101 Firefox/52.0
Build ID: 20170612021003

Steps to reproduce:

While building on Solaris I'm getting an error (see below) because of:

#if defined(__sun) && !defined(SVR4)
extern int fclose(FILE *);
extern int fprintf(FILE *, char *, ...);
extern int isatty(int);
extern char *sys_errlist[];
#define strerror(errno) sys_errlist[errno]
#endif

I don't see anywhere SVR4 to be defined (where Solaris should be SVR4). But on other hand __sun should mean Solaris. So probably some historical residuum which should be no longer needed.

 0:37.53 gmake[5]: Entering directory '/var/tmp/firefox/obj-x86_64-pc-solaris2.12/security/nss/cmd/certutil/certutil_certutil'
 0:37.54 /usr/bin/gcc -std=gnu99 -o keystuff.o -c  -DNDEBUG -DTRIMMED=1 -DNSPR20 -DNSS_X86_OR_X64 -DNSS_X64 -DNSS_USE_64 -DNSS_NO_INIT_SUPPORT -DUSE_UTIL_DIRECTLY -DNO_NSPR_10_SUPPORT -DSSL_DISABLE_DEPRECATED_CIPHER_SUITE_NAMES -DHAVE_STRERROR -DXP_UNIX -D_REENTRANT -DNSS_DISABLE_LIBPKIX -I/var/tmp/firefox/security/nss/cmd/certutil -I/var/tmp/firefox/obj-x86_64-pc-solaris2.12/security/nss/cmd/certutil/certutil_certutil -I/var/tmp/firefox/obj-x86_64-pc-solaris2.12/dist/include/nspr -I/var/tmp/firefox/obj-x86_64-pc-solaris2.12/dist/include/private/nss -I/var/tmp/firefox/obj-x86_64-pc-solaris2.12/dist/include/dbm -I/var/tmp/firefox/obj-x86_64-pc-solaris2.12/dist/include/nss -I/var/tmp/firefox/obj-x86_64-pc-solaris2.12/dist/include    -fPIC  -include /var/tmp/firefox/obj-x86_64-pc-solaris2.12/mozilla-config.h -DMOZILLA_CLIENT -MD -MP -MF .deps/keystuff.o.pp  -Wall -Wempty-body -Wignored-qualifiers -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wformat -fno-strict-aliasing -fno-math-errno -pthread -pipe  -g -O -fno-omit-frame-pointer    /var/tmp/firefox/security/nss/cmd/certutil/keystuff.c
 0:38.03 firefox
 0:38.06 /var/tmp/firefox/obj-x86_64-pc-solaris2.12/_virtualenv/bin/python /var/tmp/firefox/config/expandlibs_exec.py --uselist --  /usr/bin/g++ -std=gnu++11 -o firefox  -Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wc++14-compat -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wformat -fno-exceptions -fno-strict-aliasing -fno-rtti -fno-exceptions -fno-math-errno -pthread -pipe  -g -O -fno-omit-frame-pointer   nsBrowserApp.o   -lpthread  -Wl,-z,text   -rdynamic -L/var/tmp/firefox/obj-x86_64-pc-solaris2.12/dist/bin   ../../xpcom/glue/standalone/libxpcomglue.a ../../mozglue/build/libmozglue.a ../../memory/fallible/libfallible.a    -lsocket
 0:38.09 /var/tmp/firefox/security/nss/cmd/certutil/keystuff.c:22:12: error: conflicting types for 'fprintf'
 0:38.09  extern int fprintf(FILE *, char *, ...);
 0:38.09             ^
 0:38.09 In file included from /usr/include/stdio.h:66:0,
 0:38.09                  from /var/tmp/firefox/security/nss/cmd/certutil/keystuff.c:5:
 0:38.09 /usr/include/iso/stdio_iso.h:247:12: note: previous declaration of 'fprintf' was here
 0:38.09  extern int fprintf(FILE *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, ...);
 0:38.09             ^
 0:38.17 gmake[5]: *** [/var/tmp/firefox/config/rules.mk:858: keystuff.o] Error 1
 0:38.17 gmake[5]: Leaving directory '/var/tmp/firefox/obj-x86_64-pc-solaris2.12/security/nss/cmd/certutil/certutil_certutil'
 0:38.17 gmake[4]: *** [/var/tmp/firefox/config/recurse.mk:73: security/nss/cmd/certutil/certutil_certutil/target] Error 2
Assignee

Comment 1

2 years ago
Attachment #8876733 - Flags: review?(ttaubert)
Component: Untriaged → Security: PSM
Product: Firefox → Core
Assignee: nobody → nobody
Component: Security: PSM → Libraries
Product: Core → NSS
Version: Trunk → trunk
Attachment #8876733 - Flags: review?(ttaubert) → review+
Assignee: nobody → petr.sumbera
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Assignee

Updated

2 years ago
Keywords: checkin-needed
Thanks!

https://hg.mozilla.org/projects/nss/rev/d68d2b44082f
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 3.32
You need to log in before you can comment on or make changes to this bug.