Conversation
src/port/glob.c, src/port/glob.h and src/include/port/win32_msvc/glob.h
carry the original 4-clause BSD license from the Regents of the
University of California, with the advertising clause intact. The ASF
lists that variant under Category X, which may not be distributed in
source or binary form, and the files have shipped in every release so
far. Reported by Justin Mclean during the 2.2.0-rc1 IPMC vote.
The files are not PostgreSQL code and can simply go away:
- PostgreSQL has no glob.c, glob.h or win32_msvc/glob.h on master,
REL_16_STABLE or REL_14_STABLE; upstream's win32_msvc directory
holds only dirent.h, sys, unistd.h and utime.h. src/port/glob.c
still carries a PHP CVS keyword ($Id: glob.c,v 1.7 2007/11/10
09:56:37 dmitry Exp $), so it came from PHP's win32 glob by way of
Greenplum, and src/port/glob.h arrived with "Move gpfdist to gpdb
core".
- The only consumers are the Windows gpfdist builds. In
src/bin/gpfdist/Makefile the object was added under
ifeq ($(PORTNAME),win32), and src/bin/gpfdist/CMakeLists.txt is a
standalone MSVC project (/MP /wd4996 compiler switches, ws2_32 and
Crypt32, libapr-1.lib) that nothing in the build system invokes.
Cloudberry neither supports nor produces Windows builds.
- The two places that really use glob, src/backend/utils/adt/dbsize.c
and src/backend/utils/misc/fstream/fstream.c, include <glob.h> and
resolve to the system header.
The win32 block in the gpfdist Makefile is removed whole rather than
trimmed: its -I$(top_builddir)/src/port was added by the same commit
that added src/port/glob.h and existed only to find that header.
The LICENSE section covering these files and licenses/LICENSE-glob.txt
go with them. Note that the section listed only two of the three files;
src/port/glob.h was never registered.
Checked on Rocky 9 that no reference to glob.c, glob.o or LICENSE-glob
remains anywhere in the tree, and that gpfdist builds byte-identically
before and after (133152 bytes) and still runs; PORTNAME is linux there,
so the removed block never fired to begin with.
Assisted-by: Claude Code
Backpatch-through: REL_2_STABLE
leborchuk
approved these changes
Sep 14, 2026
leborchuk
left a comment
Contributor
There was a problem hiding this comment.
LGTM, indeed postgres does not have such files https://github.com/postgres/postgres/tree/master/src/port
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
src/port/glob.c, src/port/glob.h and src/include/port/win32_msvc/glob.h carry the original 4-clause BSD license from the Regents of the University of California, with the advertising clause intact. The ASF lists that variant under Category X, which may not be distributed in source or binary form, and the files have shipped in every release so far. Reported by Justin Mclean during the 2.2.0-rc1 IPMC vote.
The files are not PostgreSQL code and can simply go away:
The win32 block in the gpfdist Makefile is removed whole rather than trimmed: its -I$(top_builddir)/src/port was added by the same commit that added src/port/glob.h and existed only to find that header.
The LICENSE section covering these files and licenses/LICENSE-glob.txt go with them. Note that the section listed only two of the three files; src/port/glob.h was never registered.
Checked on Rocky 9 that no reference to glob.c, glob.o or LICENSE-glob remains anywhere in the tree, and that gpfdist builds byte-identically before and after (133152 bytes) and still runs; PORTNAME is linux there, so the removed block never fired to begin with.
Assisted-by: Claude Code
Backpatch-through: REL_2_STABLE
Fixes #ISSUE_Number
What does this PR do?
Type of Change
Breaking Changes
Test Plan
make installcheckmake -C src/test installcheck-cbdb-parallelImpact
Performance:
User-facing changes:
Dependencies:
Checklist
Additional Context
CI Skip Instructions