Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 713086 | Differences between
and this patch

Collapse All | Expand All

(-)vdr-2.4.6.orig/config.h (+1 lines)
Lines 19-24 Link Here
19
#include "i18n.h"
19
#include "i18n.h"
20
#include "font.h"
20
#include "font.h"
21
#include "tools.h"
21
#include "tools.h"
22
#include <limits.h>
22
23
23
// VDR's own version number:
24
// VDR's own version number:
24
25
(-)vdr-2.4.6.orig/i18n.h (-1 / +1 lines)
Lines 46-52 Link Here
46
   ///< have an actual locale installed. The rest are just dummy entries
46
   ///< have an actual locale installed. The rest are just dummy entries
47
   ///< to allow having three letter language codes for other languages
47
   ///< to allow having three letter language codes for other languages
48
   ///< that have no actual locale on this system.
48
   ///< that have no actual locale on this system.
49
const char *I18nTranslate(const char *s, const char *Plugin = NULL) __attribute_format_arg__(1);
49
const char *I18nTranslate(const char *s, const char *Plugin = NULL)  __attribute__((__format_arg__ (1)));
50
   ///< Translates the given string (with optional Plugin context) into
50
   ///< Translates the given string (with optional Plugin context) into
51
   ///< the current language. If no translation is available, the original
51
   ///< the current language. If no translation is available, the original
52
   ///< string will be returned.
52
   ///< string will be returned.
(-)vdr-2.4.6.orig/osd.c (-1 / +1 lines)
Lines 12-18 Link Here
12
#include <stdlib.h>
12
#include <stdlib.h>
13
#include <sys/ioctl.h>
13
#include <sys/ioctl.h>
14
#include <sys/stat.h>
14
#include <sys/stat.h>
15
#include <sys/unistd.h>
15
#include <unistd.h>
16
#include "device.h"
16
#include "device.h"
17
#include "tools.h"
17
#include "tools.h"
18
18
(-)vdr-2.4.6.orig/thread.c (-1 / +3 lines)
Lines 160-166 Link Here
160
  writeLockThreadId = 0;
160
  writeLockThreadId = 0;
161
  pthread_rwlockattr_t attr;
161
  pthread_rwlockattr_t attr;
162
  pthread_rwlockattr_init(&attr);
162
  pthread_rwlockattr_init(&attr);
163
#if defined(__GLIBC__)
163
  pthread_rwlockattr_setkind_np(&attr, PreferWriter ? PTHREAD_RWLOCK_PREFER_WRITER_NP : PTHREAD_RWLOCK_PREFER_READER_NP);
164
  pthread_rwlockattr_setkind_np(&attr, PreferWriter ? PTHREAD_RWLOCK_PREFER_WRITER_NP : PTHREAD_RWLOCK_PREFER_READER_NP);
165
#endif
164
  pthread_rwlock_init(&rwlock, &attr);
166
  pthread_rwlock_init(&rwlock, &attr);
165
}
167
}
166
168
Lines 210-216 Link Here
210
  locked = 0;
212
  locked = 0;
211
  pthread_mutexattr_t attr;
213
  pthread_mutexattr_t attr;
212
  pthread_mutexattr_init(&attr);
214
  pthread_mutexattr_init(&attr);
213
  pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK_NP);
215
  pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK);
214
  pthread_mutex_init(&mutex, &attr);
216
  pthread_mutex_init(&mutex, &attr);
215
}
217
}
216
218
(-)vdr-2.4.6.orig/tools.c (-2 / +3 lines)
Lines 27-32 Link Here
27
#include <utime.h>
27
#include <utime.h>
28
#include "i18n.h"
28
#include "i18n.h"
29
#include "thread.h"
29
#include "thread.h"
30
#include <limits.h>
30
31
31
int SysLogLevel = 3;
32
int SysLogLevel = 3;
32
33
Lines 654-660 Link Here
654
{
655
{
655
  if (!FileName)
656
  if (!FileName)
656
     return NULL;
657
     return NULL;
657
  char *TargetName = canonicalize_file_name(FileName);
658
  char *TargetName = realpath(FileName, NULL);
658
  if (!TargetName) {
659
  if (!TargetName) {
659
     if (errno == ENOENT) // file doesn't exist
660
     if (errno == ENOENT) // file doesn't exist
660
        TargetName = strdup(FileName);
661
        TargetName = strdup(FileName);
Lines 1544-1550 Link Here
1544
struct dirent *cReadDir::Next(void)
1545
struct dirent *cReadDir::Next(void)
1545
{
1546
{
1546
  if (directory) {
1547
  if (directory) {
1547
#if !__GLIBC_PREREQ(2, 24) // readdir_r() is deprecated as of GLIBC 2.24
1548
#if __GLIBC__
1548
     while (readdir_r(directory, &u.d, &result) == 0 && result) {
1549
     while (readdir_r(directory, &u.d, &result) == 0 && result) {
1549
#else
1550
#else
1550
     while ((result = readdir(directory)) != NULL) {
1551
     while ((result = readdir(directory)) != NULL) {
(-)vdr-2.4.6.orig/tools.h (-2 / +12 lines)
Lines 28-33 Link Here
28
#include <sys/types.h>
28
#include <sys/types.h>
29
#include "thread.h"
29
#include "thread.h"
30
30
31
#ifndef ACCESSPERMS
32
# define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */
33
#endif
34
#ifndef ALLPERMS
35
# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */
36
#endif
37
#ifndef DEFFILEMODE
38
# define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)/* 0666*/
39
#endif
40
31
typedef unsigned char uchar;
41
typedef unsigned char uchar;
32
42
33
extern int SysLogLevel;
43
extern int SysLogLevel;
Lines 412-418 Link Here
412
private:
422
private:
413
  DIR *directory;
423
  DIR *directory;
414
  struct dirent *result;
424
  struct dirent *result;
415
#if !__GLIBC_PREREQ(2, 24) // readdir_r() is deprecated as of GLIBC 2.24
425
#if __GLIBC__
416
  union { // according to "The GNU C Library Reference Manual"
426
  union { // according to "The GNU C Library Reference Manual"
417
    struct dirent d;
427
    struct dirent d;
418
    char b[offsetof(struct dirent, d_name) + NAME_MAX + 1];
428
    char b[offsetof(struct dirent, d_name) + NAME_MAX + 1];
Lines 777-783 Link Here
777
        data[i] = T(0);
787
        data[i] = T(0);
778
    size = 0;
788
    size = 0;
779
  }
789
  }
780
  void Sort(__compar_fn_t Compare)
790
  void Sort(int (*Compare)(const void *, const void *))
781
  {
791
  {
782
    qsort(data, size, sizeof(T), Compare);
792
    qsort(data, size, sizeof(T), Compare);
783
  }
793
  }
(-)vdr-2.4.6.orig/vdr.c (+6 lines)
Lines 689-700 Link Here
689
        }
689
        }
690
     }
690
     }
691
  else if (Terminal) {
691
  else if (Terminal) {
692
#ifdef __GLIBC__
692
     // Claim new controlling terminal
693
     // Claim new controlling terminal
693
     stdin  = freopen(Terminal, "r", stdin);
694
     stdin  = freopen(Terminal, "r", stdin);
694
     stdout = freopen(Terminal, "w", stdout);
695
     stdout = freopen(Terminal, "w", stdout);
695
     stderr = freopen(Terminal, "w", stderr);
696
     stderr = freopen(Terminal, "w", stderr);
696
     HasStdin = true;
697
     HasStdin = true;
697
     tcgetattr(STDIN_FILENO, &savedTm);
698
     tcgetattr(STDIN_FILENO, &savedTm);
699
#else
700
     // stdin, stdout, stderr are declared FILE const* by musl C library
701
     fprintf(stderr, "Option '-t' is only supported if VDR has been built against glibc.\n");
702
     return 2;
703
#endif
698
     }
704
     }
699
705
700
  isyslog("VDR version %s started", VDRVERSION);
706
  isyslog("VDR version %s started", VDRVERSION);

Return to bug 713086