Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Remove redundant #undef for HAVE_STDLIB_H #4435

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 26, 2025

Conversation

kleisauke
Copy link
Member

@kleisauke kleisauke commented Mar 23, 2025

Aside from the HAVE_MAGICK marco that will be fixed via PR #4433, this was the only HAVE_* macro we never defined but were still checking for. Found using:

Script
$ find . \( -name '*.[hc]' -o -name '*.cc' -o -name '*.cpp' \) -exec awk '/^#if/ {print $0}' {} \; | sort | uniq > expressions.txt
$ grep -vFf <(awk '/^#define|^#undef/ {print $2}' build/config.h) expressions.txt | grep 'HAVE_'
#ifdef HAVE_ACQUIREEXCEPTIONINFO
#ifdef HAVE_ACQUIREIMAGE
#ifdef HAVE_BLOBTOSTRINGINFO
#ifdef HAVE_CMYCOLORSPACE
#ifdef HAVE_CONFIG_H
#ifdef HAVE_GETIMAGEMAGICK3
#ifdef HAVE_GETVIRTUALPIXELS
#ifdef HAVE_HCLPCOLORSPACE
#ifdef HAVE_INHERITEXCEPTION
#ifdef HAVE_MAGICK6
#ifdef HAVE_NUMBER_SCENES
#ifdef HAVE_OPTIMIZEIMAGETRANSPARENCY
#ifdef HAVE_OPTIMIZEPLUSIMAGELAYERS
#ifdef HAVE_ORC
#ifdef HAVE_PDFIUM
#ifdef HAVE_PNG
#ifdef HAVE_PNG_SET_CHUNK_MALLOC_MAX
#ifdef HAVE_QUANTIZATION
#ifdef HAVE_RESETIMAGEPROFILEITERATOR
#ifdef HAVE_RESETIMAGEPROPERTYITERATOR
#ifdef HAVE_SETIMAGEEXTENT
#ifdef HAVE_SETIMAGEOPTION
#ifdef HAVE_SETIMAGEPROPERTY
#ifdef HAVE_STDLIB_H
#if defined(HAVE_PNG)
#ifndef HAVE_ORC
#ifndef HAVE_ORC_CF_PROTECTION

Though, that script also prints HAVE_* macros that we define in code (like #define HAVE_QUANTIZATION), pass as compile args (like -DHAVE_CONFIG) or from alternative dependencies not compiled on my machine, such as liborc (instead of Highway), PDFium (instead of Poppler), libpng (instead of spng), and GraphicsMagick/ImageMagick6 (instead of ImageMagick7).

It's no longer defined by our build system.
@jcupitt jcupitt merged commit add9ca0 into libvips:master Mar 26, 2025
6 checks passed
@kleisauke kleisauke deleted the rm-redundant-undef branch March 26, 2025 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants