mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Moved the NPTL and UTF-8 checks after the version and help output
This commit is contained in:
parent
a05b921e29
commit
70ac6784ac
@ -646,6 +646,7 @@ Andreas Kool <akool@akool.de>
|
|||||||
for fixing detecting the /dev/videoN devices for GRAB in case there are others
|
for fixing detecting the /dev/videoN devices for GRAB in case there are others
|
||||||
before the DVB devices
|
before the DVB devices
|
||||||
for fixing a possible NULL pointer access in cEITScanner::Process()
|
for fixing a possible NULL pointer access in cEITScanner::Process()
|
||||||
|
for pointing out that 'vdr --version' failed on an UTF-8 system
|
||||||
|
|
||||||
Guy Roussin <guy.roussin@teledetection.fr>
|
Guy Roussin <guy.roussin@teledetection.fr>
|
||||||
for suggesting not to display channel group delimiters without text
|
for suggesting not to display channel group delimiters without text
|
||||||
|
2
HISTORY
2
HISTORY
@ -3561,3 +3561,5 @@ Video Disk Recorder Revision History
|
|||||||
Oliver Endriss).
|
Oliver Endriss).
|
||||||
- No longer stopping Transfer Mode or replay immediately when the Power button
|
- No longer stopping Transfer Mode or replay immediately when the Power button
|
||||||
is pressed (thanks to Rolf Ahrenberg).
|
is pressed (thanks to Rolf Ahrenberg).
|
||||||
|
- Moved the NPTL and UTF-8 checks after the version and help output (thanks to
|
||||||
|
Andreas Kool for pointing out that 'vdr --version' failed on an UTF-8 system).
|
||||||
|
40
vdr.c
40
vdr.c
@ -22,7 +22,7 @@
|
|||||||
*
|
*
|
||||||
* The project's page is at http://www.cadsoft.de/vdr
|
* The project's page is at http://www.cadsoft.de/vdr
|
||||||
*
|
*
|
||||||
* $Id: vdr.c 1.206 2005/05/26 10:30:18 kls Exp $
|
* $Id: vdr.c 1.207 2005/05/26 10:45:29 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
@ -87,25 +87,6 @@ static void Watchdog(int signum)
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
#ifdef _CS_GNU_LIBPTHREAD_VERSION
|
|
||||||
// Check for NPTL and exit if present - VDR apparently doesn't run well with NPTL:
|
|
||||||
char LibPthreadVersion[128];
|
|
||||||
if (confstr(_CS_GNU_LIBPTHREAD_VERSION, LibPthreadVersion, sizeof(LibPthreadVersion)) > 0) {
|
|
||||||
if (strstr(LibPthreadVersion, "NPTL")) {
|
|
||||||
fprintf(stderr, "vdr: please turn off NPTL by setting 'export LD_ASSUME_KERNEL=2.4.1' before starting VDR\n");
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Check for UTF-8 and exit if present - asprintf() will fail if it encounters 8 bit ASCII codes
|
|
||||||
char *LangEnv;
|
|
||||||
if ((LangEnv = getenv("LANG")) != NULL && strcasestr(LangEnv, "utf") ||
|
|
||||||
(LangEnv = getenv("LC_CTYPE")) != NULL && strcasestr(LangEnv, "utf")) {
|
|
||||||
fprintf(stderr, "vdr: please turn off UTF-8 before starting VDR\n");
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Save terminal settings:
|
// Save terminal settings:
|
||||||
|
|
||||||
struct termios savedTm;
|
struct termios savedTm;
|
||||||
@ -321,6 +302,25 @@ int main(int argc, char *argv[])
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef _CS_GNU_LIBPTHREAD_VERSION
|
||||||
|
// Check for NPTL and exit if present - VDR apparently doesn't run well with NPTL:
|
||||||
|
char LibPthreadVersion[128];
|
||||||
|
if (confstr(_CS_GNU_LIBPTHREAD_VERSION, LibPthreadVersion, sizeof(LibPthreadVersion)) > 0) {
|
||||||
|
if (strstr(LibPthreadVersion, "NPTL")) {
|
||||||
|
fprintf(stderr, "vdr: please turn off NPTL by setting 'export LD_ASSUME_KERNEL=2.4.1' before starting VDR\n");
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Check for UTF-8 and exit if present - asprintf() will fail if it encounters 8 bit ASCII codes
|
||||||
|
char *LangEnv;
|
||||||
|
if ((LangEnv = getenv("LANG")) != NULL && strcasestr(LangEnv, "utf") ||
|
||||||
|
(LangEnv = getenv("LC_CTYPE")) != NULL && strcasestr(LangEnv, "utf")) {
|
||||||
|
fprintf(stderr, "vdr: please turn off UTF-8 before starting VDR\n");
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
// Log file:
|
// Log file:
|
||||||
|
|
||||||
if (SysLogLevel > 0)
|
if (SysLogLevel > 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user