Commit Graph

31 Commits

Author SHA1 Message Date
Collin Funk d1e2febb6d build: update a symbol that was renamed in gnulib
As noted in a gnulib NEWS item of 2023-01-07, linking now happens
against $(CLOCK_TIME_LIB) instead of $(LIB_CLOCK_GETTIME).
2024-08-27 10:20:56 +02:00
Mike Frysinger c59e9d228e build: link in $(GETRANDOM_LIB) from gnulib
On Windows builds, gnulib might set GETRANDOM_LIB to -lbcrypt and then
use that API.  But since we don't include $(GETRANDOM_LIB) when linking,
we fail.  On Linux systems, this is empty as getrandom APIs are part of
the main C library already.  This is also what the link requirements say
in gnulib's modules/getrandom spec.
2024-01-12 17:00:34 +01:00
LIU Hao ec0c13afda build: ignore errors from `git describe`
Due to CVE-2022-24765, Git refuses to operate on local repositories if
it runs as a different user from its owner.  Since version 2.35.2:

  $ sudo git describe --tags
  fatal: unsafe repository ('/home/lh_mouse/GitHub/nano-win' is owned by someone else)
  To add an exception for this directory, call:

    git config --global --add safe.directory /home/lh_mouse/GitHub/nano-win

Conventionally, a user, who wishes to build and install nano from Git,
does this:

  $ ./configure
  $ make
  $ sudo make install

The first `make` command builds the program as the current user.
The `make install` then installs the built files.

However, we have a recipe for 'revision.h' that is always executed,
even in the case of `make install`.  As here it is run as root, Git
actually fails and produces an empty string.  This causes `make install`
to rebuild nano.o and winio.o and results in an empty version string in
the upper left corner.

The solution is simple: First we attempt a dryrun of `git describe`.
If it fails, 'revision.h', which should have been updated by the first
`make` command, will be left intact.

Reference: https://nvd.nist.gov/vuln/detail/CVE-2022-24765

Signed-off-by: LIU Hao <lh_mouse@126.com>
2022-06-14 11:54:47 +02:00
Benno Schulenberg 45defd25f3 build: avoid a warning about duplicate symbol when building from tarball
Reported-by: Hans-Bernhard Bröker <HBBroeker@t-online.de>

Bug existed since commit 3ea2694d from last week.
2021-02-02 11:39:26 +01:00
Benno Schulenberg 18659f3485 build: fix the Makefile after two header files were renamed
Reported-by: Kamil Dudka <kdudka@redhat.com>
2020-06-25 21:11:26 +02:00
Benno Schulenberg a1c73317f7 organization: move all history-related stuff to its own file 2017-09-17 12:46:36 +02:00
Benno Schulenberg 23f5515fbb build: for Solaris, tell the linker to use a threading lib
This fixes https://savannah.gnu.org/bugs/?51348.
Reported-by: Henrik Karlsson <henrik.karlsson@pulsen.se>
Tested-by: John Wiersba <jrw32982@yahoo.com>
2017-07-05 21:18:52 +02:00
Benno Schulenberg cd7c3483b4 build: for Solaris, tell the linker where to find clock_gettime()
This fixes https://savannah.gnu.org/bugs/?50972.
Reported-by: John Wiersba <jrw32982@yahoo.com>
2017-05-17 10:53:21 +02:00
Benno Schulenberg c620fc6aa9 build: use backticks to avoid a warning during autoreconf 2017-05-09 20:23:04 +02:00
Benno Schulenberg 968c07fc81 build: use the "force" mechanism to always run the revision rule
Whenever 'make' is run, it should check whether the revision has
changed, and if so, it should update src/revision.h.

This portable FORCE mechanism should have been the replacement for
the phony target that was removed in a33a4f00, five commits ago.

This fixes https://savannah.gnu.org/bugs/?50956 in a better way.
2017-05-09 17:30:49 +02:00
Benno Schulenberg a33a4f00e5 build: don't use a dummy dependency, as it breaks non-GNU makes
This fixes https://savannah.gnu.org/bugs/?50956.
Reported-by: John Wiersba <jrw32982@yahoo.com>
2017-05-08 21:27:07 +02:00
Mike Frysinger 9a2deb4182 drop the glib fallback for snprintf/vsnprintf
The gnulib imports handle this for us now.
2017-03-06 12:01:17 +01:00
Mike Frysinger ba8d71f447 add support for gnulib
On a system with up-to-date GNU tools, this does not change
the size of nano's binary.

We start off with importing only a few modules, although we
don't yet delete the fallback logic for them.
2017-03-06 11:56:02 +01:00
Benno Schulenberg 248d7be8ef build: clean out the revision.h file, to make 'make distcheck' pass 2016-12-04 11:21:10 +01:00
Benno Schulenberg 2ae490cd8f build: refresh the git description whenever something is recompiled
This fixes https://savannah.gnu.org/bugs/?47962 reported by Cody Taylor.
2016-06-27 19:45:21 +02:00
Benno Schulenberg 1f67c1244d Removing an "-I m4" flag; it is needed only at the top level.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4970 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-06-16 12:45:03 +00:00
Benno Schulenberg b21daeb009 Dropping redundant localedir. Patch by Mike Frysinger.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4695 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-03-30 20:19:33 +00:00
Benno Schulenberg fde9d4c189 Renaming 'INCLUDES' to 'AM_CPPFLAGS', patch by Mike Frysinger.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4605 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2014-02-25 19:08:12 +00:00
David Lawrence Ramsey f397dae5c5 in src/Makefile.am, remove "-Iintl" from INCLUDES, as we don't use an
intl directory inside the source directory anymore


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3595 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-28 22:33:14 +00:00
David Lawrence Ramsey c9d76207f3 in src/Makefile.am, if we're uninstalling, remove the "rnano" symlink
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3526 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2006-05-18 20:18:36 +00:00
David Lawrence Ramsey 43fff01ede move functions specific to the file browser to their own source file,
browser.c


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3094 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-05 20:01:11 +00:00
David Lawrence Ramsey 7e2d673b5f move functions specific to the help browser to their own source file,
help.c, and adjust related variables accordingly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3072 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-01 19:32:45 +00:00
David Lawrence Ramsey d24d0a43e8 move functions specific to the statusbar prompt to their own source
file, prompt.c, and adjust related variables accordingly


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3065 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-11-01 17:37:44 +00:00
David Lawrence Ramsey 691698a954 move advanced text operations (command execution in a buffer, wrapping,
spell checking, justifying, and word counting) to their own source file,
text.c


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2919 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-07-24 19:57:51 +00:00
David Lawrence Ramsey e3013e3ed0 in src/Makefile.am, if we're installing and the "rnano" symlink already
exists, remove it so that we can create it again without an error


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2265 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-14 18:47:42 +00:00
David Lawrence Ramsey b54155c4a4 massive updates to multibyte/wide character support; deal with multibyte
characters and strings instead of wide characters and strings as much as
possible, and move multibyte/wide character-specific functions into
their own source file, chars.c


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2248 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2005-01-12 03:25:57 +00:00
Jordi Mallach d7b632560c Don't use DEFS to define stuff. Use INCLUDES instead.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2108 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-11-18 00:05:14 +00:00
David Lawrence Ramsey 8bf08097ee remove reference to @includedir@ in src/Makefile.am, as it's unneeded
and can break cross-compilation


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1927 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-09-01 22:08:57 +00:00
David Lawrence Ramsey 76fb3eccda automatically install a symlink "rnano" pointing to nano
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1878 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-08-01 16:09:15 +00:00
David Lawrence Ramsey 9ef3adbc1d add a consistency fix for do_enter() and a few minor cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1874 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2004-07-30 17:30:17 +00:00
Jordi Mallach 298b975264 Major package reorganization:
- Move code to src/.
- Move docs to doc/:
  + texi doc to doc/texinfo/
  + original manual pages to doc/man/
  + translated manual pages to doc/man/xx/


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1543 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
2003-09-07 00:44:12 +00:00