Closed Bug 944935 Opened 6 years ago Closed 6 years ago

Cleanup some useless function tests in configure.in

Categories

(Firefox Build System :: General, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla29

People

(Reporter: glandium, Assigned: glandium)

References

Details

(Whiteboard: [qa-])

Attachments

(1 file)

We're AC_CHECK_FUNC'ing a lot of functions for things that are either always there, or, even worse, using them without even checking for the HAVE_* macro that AC_CHECK_FUNC sets (since it doesn't fail)
- HAVE_RANDOM is not checked at all.
- HAVE_STRERROR is not checked in code built using the defines from the main
  configure.
- HAVE_LCHOWN is only checked in nsinstall.c, which means the test is also wrong
  since it's checking for the target instead of the host. Also, lchown is only
  used of the -o and -g options of nsinstall, which, as far as I know, we don't
  use (and if we were, that would fail with nsinstall.py, which explicitly rejects
  them).
- HAVE_FCHMOD is only checked in nsinstall.c, so same as above about the
  correctness of the check. If it's not available, nsinstall.c falls back to
  chmod, which is fine enough for our use.
- HAVE_SNPRINTF is not checked.
- HAVE_MEMMOVE is checked in parser/expat/lib/xmlparse.c, but it's also
  unconditionally defined in expat_config.h which is included from that file.
- HAVE_SETBUF is checked in a couple files, but setbuf is C89 and C99, I think
  it's safe to assume all compilers we support are C89 and C99. Interestingly,
  windows does have it, but since we skip this check on windows, we don't use it.
- HAVE_ISATTY, same as HAVE_SETBUF, except it's POSIX instead of C89/C99.
- HAVE_FLOCKFILE is not checked at all.
- HAVE_STRTOK_R is not checked.
- HAVE_FT_SELECT_SIZE is not checked.
- HAVE_DLADDR is not checked under js/src.
- HAVE_GETPAGESIZE is not checked under js/src (it is in libffi, but ffi uses
  its own configure)
- HAVE_LSTAT64, HAVE_STAT64, HAVE_STATVFS, HAVE_STATVFS64, HAVE_TRUNCATE64 are
  not checked under js/src.
- HAVE_SBRK is not checked under js/src. Moreover,
  js/src/assembler/wtf/Platform.h defines it depending on the platform.
- HAVE_SNPRINTF is not checked under js/src.
- HAVE_HYPOT is not checked under js/src.
- HAVE__UNWIND_BACKTRACE is not checked under js/src.
Attachment #8340699 - Flags: review?(gps)
(In reply to Mike Hommey [:glandium] from comment #1)
> - HAVE_SNPRINTF is not checked.

There are two uses in comm-central/libical/src/libical/ code.

All of the other mentioned variables are otherwise unused in comm-central.
(In reply to Joshua Cranmer [:jcranmer] from comment #4)
> (In reply to Mike Hommey [:glandium] from comment #1)
> > - HAVE_SNPRINTF is not checked.
> 
> There are two uses in comm-central/libical/src/libical/ code.

c-c built files are using c-c's ACDEFINES, aren't they?
(In reply to Mike Hommey [:glandium] from comment #5)
> c-c built files are using c-c's ACDEFINES, aren't they?

c-c's ACDEFINES are m-c's ACDEFINES plus a bit of path munging.
Comment on attachment 8340699 [details] [diff] [review]
Cleanup some useless AC_CHECK_FUNCS tests in configure.in

Review of attachment 8340699 [details] [diff] [review]:
-----------------------------------------------------------------

What could possibly go wrong :P
Attachment #8340699 - Flags: review?(gps) → review+
Duplicate of this bug: 948717
https://hg.mozilla.org/mozilla-central/rev/924d56cc2c07
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Whiteboard: [qa-]
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.