aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/fallback.h
Commit message (Collapse)AuthorAge
* remove dependency on dcgettext()Gravatar Kurtis Rader2016-06-05
| | | | | While fixing issue #3110 I noticed there is exactly one place we use dcgettext() and that use is completely unnecessary. So remove it.
* fix random lint issuesGravatar Kurtis Rader2016-05-29
| | | | | | | | This only eliminates errors reported by `make lint`. It shouldn't cause any functional changes. This change does remove several functions that are unused. It also removes the `desc_arr` variable which is both unused and out of date with reality.
* fix building on CygwinGravatar Kurtis Rader2016-05-19
| | | | | | | Cygwin still doesn't support any of the backtrace functions. Also, remove a spurious newline from a debug message. Fixes #2993
* make fish buildable on OS X Snow LeopardGravatar Kurtis Rader2016-05-19
| | | | | | | | | | | | | I noticed that the `test_convert()` function was randomly failing when run on OS X Snow Leopard. I tracked it down to the `mbrtowc()` function on that OS being broken. Explicitly testing for UTF-8 prefixes that identify a sequence longer than four bytes (which the Unicode standard made illegal long ago) keeps us from having encoding errors on those OS's. This also makes the errors reported by the `test_convert()` function actually useful and readable. Lastly, it makes it possible to build fish on OS X Snow Leopard.
* move convert_digit from fallback to commonGravatar David Adam2016-05-18
| | | | It's not required as part of fallback functions any more.
* fallback: drop fallbacks for C99/C++0x wide character functionsGravatar David Adam2016-05-18
| | | | | | | | Drops configure check for wcsdup, wcslen, wcscasecmp, wcsncasecmp, wcwidth, wcswidth, wcstok, fputwc, fgetwc, and wcstol. Drop the fallback implementations of these on non-Snow Leopard platforms. Work on #2999.
* fallback: remove fwprintf and friends fallbacksGravatar David Adam2016-05-18
| | | | | | | All modern operating systems implement fwprintf, including NetBSD (which introduced them in 2005). Work on #2999.
* fallback: remove sysconf fallbackGravatar David Adam2016-05-18
| | | | | | | sysconf was introduced in IEEE Std 1003.1-1988 (POSIX.1) and exists on every system I can find. Work on #2999.
* configure: drop tests for ancient platformsGravatar David Adam2016-05-18
| | | | Work on #2999.
* add missing fallback declarationsGravatar Kurtis Rader2016-05-03
| | | | Fixes #2993
* restyle fallback module to match project styleGravatar Kurtis Rader2016-04-30
| | | | | | | | | | Reduces lint errors from 36 to 33 (-8%). Line count from 1910 to 1476 (-23%). Another step in resolving issue #2902. This also fixes a stupid mistake from an earlier commit where I didn't realize that osx/config.h was meant to be included as a semi-static file in the repository.
* add better support for IWYU and fix thingsGravatar Kurtis Rader2016-04-26
| | | | | | | | | Remove the "make iwyu" build target. Move the functionality into the recently introduced lint.fish script. Fix a lot, but not all, of the include-what-you-use errors. Specifically, it fixes all of the IWYU errors on my OS X server but only removes some of them on my Ubuntu 14.04 server. Fixes #2957
* Fix #2919 by removing the entire block.Gravatar Aaron Gyes2016-04-09
| | | | | | | | | | | | | | This code represents only risk and does nothing useful for anything that can compile fish. In C++ situations where __STDC_VERSION__ is unset (as it should be), fish was assuming we are on < C99 and setting it to __FUNCTION__. Basically always, __PRETTY_FUNCTION__ ends up reaplaced by __FUNCTION__, this hurt error message usefulness and richness. __PRETTY_FUNCTION__: const thing::sub(int) __FUNCTION__: sub
* fix handling of non-ASCII chars in C localeGravatar Kurtis Rader2016-03-20
| | | | | | | | | | | | The relevant standards allow the mbtowc/mbrtowc functions to reject non-ASCII characters (i.e., chars with the high bit set) when the locale is C or POSIX. The BSD libraries (e.g., on OS X) don't do this but the GNU libraries (e.g., on Linux) do. Like most programs we need the C/POSIX locales to allow arbitrary bytes. So explicitly check if we're in a single-byte locale (which would also include ISO-8859 variants) and simply pass-thru the chars without encoding or decoding. Fixes #2802.
* assume getopt/getopt_long is availableGravatar Kurtis Rader2016-03-08
| | | | | | | | | | | There is no longer a good reason to detect whether or not getopt_long() is available. All UNIX implementations we're likely to run on have it. And if we ever find one that doesn't the right thing to do is not fallback to getopt() but to include the getopt_long() source in our package like we do with the pcre2 library. Since it's licensed under LGPL we can legally do so if it becomes necessary. This partially addresses issue #2790.
* Migrate source files into src/ directoryGravatar ridiculousfish2015-07-24
This change moves source files into a src/ directory, and puts object files into an obj/ directory. The Makefile and xcode project are updated accordingly. Fixes #1866