diff options
author | François Andriot <albator78@libertysurf.fr> | 2013-06-24 19:50:32 +0200 |
---|---|---|
committer | François Andriot <albator78@libertysurf.fr> | 2013-06-24 19:50:32 +0200 |
commit | b4359e8bf97799f83dc1ca62744db7cfcc81bc87 (patch) | |
tree | 3346872613490cc467c19e1645d0026c1221bce7 /redhat/tdebase/kdebase-3.5.13-fix_rhel4_compilation.patch | |
parent | 4cc71d79c5718d59078d06c497a56d7c05b41576 (diff) | |
download | tde-packaging-b4359e8bf97799f83dc1ca62744db7cfcc81bc87.tar.gz tde-packaging-b4359e8bf97799f83dc1ca62744db7cfcc81bc87.zip |
RPM Packaging: rename directories
Diffstat (limited to 'redhat/tdebase/kdebase-3.5.13-fix_rhel4_compilation.patch')
-rw-r--r-- | redhat/tdebase/kdebase-3.5.13-fix_rhel4_compilation.patch | 152 |
1 files changed, 152 insertions, 0 deletions
diff --git a/redhat/tdebase/kdebase-3.5.13-fix_rhel4_compilation.patch b/redhat/tdebase/kdebase-3.5.13-fix_rhel4_compilation.patch new file mode 100644 index 000000000..21ee6a4bf --- /dev/null +++ b/redhat/tdebase/kdebase-3.5.13-fix_rhel4_compilation.patch @@ -0,0 +1,152 @@ +--- kdebase/kwin/kompmgr/kompmgr.c.rhel4 2012-09-06 22:02:37.201586743 +0200 ++++ kdebase/kwin/kompmgr/kompmgr.c 2012-09-06 22:04:39.529337359 +0200 +@@ -89,6 +89,8 @@ + #include <pwd.h> + #endif + ++#define ShapeInput 2 ++ + typedef enum { + WINTYPE_DESKTOP, + WINTYPE_DOCK, +@@ -403,6 +405,70 @@ + #endif + } + ++void ++loadConfig(char *filename){ ++ FILE *file = NULL; ++ char line[ 1024 ]; ++ size_t length = 0; ++ Bool wasNull = False; ++ Bool section = False; ++ ++ if( filename == NULL ){ ++#ifdef USE_ENV_HOME ++ const char *home = getenv("HOME"); ++#else ++ const char *home; ++ struct passwd *p; ++ p = getpwuid(getuid()); ++ if (p) ++ home = p->pw_dir; ++ else ++ home = getenv("HOME"); ++#endif ++ const char *configfile = "/.xcompmgrrc"; ++ int n = strlen(home)+strlen(configfile)+1; ++ filename = (char*)malloc(n*sizeof(char)); ++ memset(filename,0,n); ++ wasNull = True; ++ ++ strcat(filename, home); ++ strcat(filename, configfile); ++ } ++ ++ printf("trying '%s' as configfile\n\n", filename); ++ ++ if( (file = fopen(filename, "r")) == NULL ){ ++ printf("failed to open config file. does it exist?\n"); ++ if( wasNull ){ ++ free(filename); ++ filename = NULL; ++ } ++ return; ++ } ++ ++ /*find section*/ ++ while( !section && fgets(line, 1023, file) != NULL ){ ++ if( strcmp(line, "[xcompmgr]\n") == 0 ) ++ section = True; ++ } ++ /*read and set values*/ ++ while( section && fgets(line, 1023, file) != NULL ){ ++ int ret = strlen( line ); ++ if( ret > 1 ){ ++ if( *line == '[' )/*found new section - maybe check for '\n'?*/ ++ break; ++ *(line+ret-1) = '\0'; ++ setParameter(line); ++ } ++ } ++ printf("\nfinished parsing the config file\n"); ++ fclose(file); ++ if( wasNull ){ ++ free(filename); ++ filename = NULL; ++ } ++} ++ + void handle_siguser (int sig) + { + int uidnum; +@@ -2992,69 +3058,6 @@ + return 0; + } + +-void +-loadConfig(char *filename){ +- FILE *file = NULL; +- char line[ 1024 ]; +- size_t length = 0; +- Bool wasNull = False; +- Bool section = False; +- +- if( filename == NULL ){ +-#ifdef USE_ENV_HOME +- const char *home = getenv("HOME"); +-#else +- const char *home; +- struct passwd *p; +- p = getpwuid(getuid()); +- if (p) +- home = p->pw_dir; +- else +- home = getenv("HOME"); +-#endif +- const char *configfile = "/.xcompmgrrc"; +- int n = strlen(home)+strlen(configfile)+1; +- filename = (char*)malloc(n*sizeof(char)); +- memset(filename,0,n); +- wasNull = True; +- +- strcat(filename, home); +- strcat(filename, configfile); +- } +- +- printf("trying '%s' as configfile\n\n", filename); +- +- if( (file = fopen(filename, "r")) == NULL ){ +- printf("failed to open config file. does it exist?\n"); +- if( wasNull ){ +- free(filename); +- filename = NULL; +- } +- return; +- } +- +- /*find section*/ +- while( !section && fgets(line, 1023, file) != NULL ){ +- if( strcmp(line, "[xcompmgr]\n") == 0 ) +- section = True; +- } +- /*read and set values*/ +- while( section && fgets(line, 1023, file) != NULL ){ +- int ret = strlen( line ); +- if( ret > 1 ){ +- if( *line == '[' )/*found new section - maybe check for '\n'?*/ +- break; +- *(line+ret-1) = '\0'; +- setParameter(line); +- } +- } +- printf("\nfinished parsing the config file\n"); +- fclose(file); +- if( wasNull ){ +- free(filename); +- filename = NULL; +- } +-} + + void + usage (char *program) |