From owner-svn-ports-head@freebsd.org Sat Sep 12 08:14:43 2020 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9458E3F7D3D; Sat, 12 Sep 2020 08:14:43 +0000 (UTC) (envelope-from olgeni@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BpQQW3Nhhz4ZBp; Sat, 12 Sep 2020 08:14:43 +0000 (UTC) (envelope-from olgeni@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5365D120CA; Sat, 12 Sep 2020 08:14:43 +0000 (UTC) (envelope-from olgeni@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08C8Ehq5057223; Sat, 12 Sep 2020 08:14:43 GMT (envelope-from olgeni@FreeBSD.org) Received: (from olgeni@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08C8EhDH057222; Sat, 12 Sep 2020 08:14:43 GMT (envelope-from olgeni@FreeBSD.org) Message-Id: <202009120814.08C8EhDH057222@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: olgeni set sender to olgeni@FreeBSD.org using -f From: Jimmy Olgeni Date: Sat, 12 Sep 2020 08:14:43 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r548296 - head/textproc/the_silver_searcher/files X-SVN-Group: ports-head X-SVN-Commit-Author: olgeni X-SVN-Commit-Paths: head/textproc/the_silver_searcher/files X-SVN-Commit-Revision: 548296 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Sep 2020 08:14:43 -0000 Author: olgeni Date: Sat Sep 12 08:14:42 2020 New Revision: 548296 URL: https://svnweb.freebsd.org/changeset/ports/548296 Log: textproc/the_silver_searcher: unbreak -fno-common with commit 21eaa1c from upstream. Added: head/textproc/the_silver_searcher/files/ head/textproc/the_silver_searcher/files/patch-commit-21eaa1c (contents, props changed) Added: head/textproc/the_silver_searcher/files/patch-commit-21eaa1c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/textproc/the_silver_searcher/files/patch-commit-21eaa1c Sat Sep 12 08:14:42 2020 (r548296) @@ -0,0 +1,161 @@ +--- src/ignore.c.orig 2018-08-07 06:43:51 UTC ++++ src/ignore.c +@@ -20,6 +20,8 @@ + const int fnmatch_flags = FNM_PATHNAME; + #endif + ++ignores *root_ignores; ++ + /* TODO: build a huge-ass list of files we want to ignore by default (build cache stuff, pyc files, etc) */ + + const char *evil_hardcoded_ignore_files[] = { +--- src/ignore.h.orig 2018-08-07 06:43:51 UTC ++++ src/ignore.h +@@ -29,7 +29,7 @@ struct ignores { + }; + typedef struct ignores ignores; + +-ignores *root_ignores; ++extern ignores *root_ignores; + + extern const char *evil_hardcoded_ignore_files[]; + extern const char *ignore_pattern_files[]; +--- src/log.c.orig 2018-08-07 06:43:51 UTC ++++ src/log.c +@@ -4,6 +4,7 @@ + #include "log.h" + #include "util.h" + ++pthread_mutex_t print_mtx = PTHREAD_MUTEX_INITIALIZER; + static enum log_level log_threshold = LOG_LEVEL_ERR; + + void set_log_level(enum log_level threshold) { +--- src/log.h.orig 2018-08-07 06:43:51 UTC ++++ src/log.h +@@ -9,7 +9,7 @@ + #include + #endif + +-pthread_mutex_t print_mtx; ++extern pthread_mutex_t print_mtx; + + enum log_level { + LOG_LEVEL_DEBUG = 10, +--- src/options.c.orig 2018-08-07 06:43:51 UTC ++++ src/options.c +@@ -20,6 +20,8 @@ const char *color_line_number = "\033[1;33m"; /* bold + const char *color_match = "\033[30;43m"; /* black with yellow background */ + const char *color_path = "\033[1;32m"; /* bold green */ + ++cli_options opts; ++ + /* TODO: try to obey out_fd? */ + void usage(void) { + printf("\n"); +--- src/options.h.orig 2018-08-07 06:43:51 UTC ++++ src/options.h +@@ -91,7 +91,7 @@ typedef struct { + } cli_options; + + /* global options. parse_options gives it sane values, everything else reads from it */ +-cli_options opts; ++extern cli_options opts; + + typedef struct option option_t; + +--- src/search.c.orig 2020-09-12 08:08:47 UTC ++++ src/search.c +@@ -2,6 +2,19 @@ + #include "print.h" + #include "scandir.h" + ++size_t alpha_skip_lookup[256]; ++size_t *find_skip_lookup; ++uint8_t h_table[H_SIZE] __attribute__((aligned(64))); ++ ++work_queue_t *work_queue = NULL; ++work_queue_t *work_queue_tail = NULL; ++int done_adding_files = 0; ++pthread_cond_t files_ready = PTHREAD_COND_INITIALIZER; ++pthread_mutex_t stats_mtx = PTHREAD_MUTEX_INITIALIZER; ++pthread_mutex_t work_queue_mtx = PTHREAD_MUTEX_INITIALIZER; ++ ++symdir_t *symhash = NULL; ++ + void search_buf(const char *buf, const size_t buf_len, + const char *dir_full_path) { + int binary = -1; /* 1 = yes, 0 = no, -1 = don't know */ +--- src/search.h.orig 2018-08-07 06:43:51 UTC ++++ src/search.h +@@ -31,9 +31,9 @@ + #include "uthash.h" + #include "util.h" + +-size_t alpha_skip_lookup[256]; +-size_t *find_skip_lookup; +-uint8_t h_table[H_SIZE] __attribute__((aligned(64))); ++extern size_t alpha_skip_lookup[256]; ++extern size_t *find_skip_lookup; ++extern uint8_t h_table[H_SIZE] __attribute__((aligned(64))); + + struct work_queue_t { + char *path; +@@ -41,12 +41,12 @@ struct work_queue_t { + }; + typedef struct work_queue_t work_queue_t; + +-work_queue_t *work_queue; +-work_queue_t *work_queue_tail; +-int done_adding_files; +-pthread_cond_t files_ready; +-pthread_mutex_t stats_mtx; +-pthread_mutex_t work_queue_mtx; ++extern work_queue_t *work_queue; ++extern work_queue_t *work_queue_tail; ++extern int done_adding_files; ++extern pthread_cond_t files_ready; ++extern pthread_mutex_t stats_mtx; ++extern pthread_mutex_t work_queue_mtx; + + + /* For symlink loop detection */ +@@ -64,7 +64,7 @@ typedef struct { + UT_hash_handle hh; + } symdir_t; + +-symdir_t *symhash; ++extern symdir_t *symhash; + + void search_buf(const char *buf, const size_t buf_len, + const char *dir_full_path); +--- src/util.c.orig 2018-08-07 06:43:51 UTC ++++ src/util.c +@@ -21,6 +21,8 @@ + } \ + return ptr; + ++FILE *out_fd = NULL; ++ag_stats stats; + void *ag_malloc(size_t size) { + void *ptr = malloc(size); + CHECK_AND_RETURN(ptr) +--- src/util.h.orig 2018-08-07 06:43:51 UTC ++++ src/util.h +@@ -12,7 +12,7 @@ + #include "log.h" + #include "options.h" + +-FILE *out_fd; ++extern FILE *out_fd; + + #ifndef TRUE + #define TRUE 1 +@@ -51,7 +51,7 @@ typedef struct { + } ag_stats; + + +-ag_stats stats; ++extern ag_stats stats; + + /* Union to translate between chars and words without violating strict aliasing */ + typedef union {