summaryrefslogtreecommitdiffstats
path: root/redhat/tdebase/kdebase-3.5.13-fix_rhel4_compilation.patch
diff options
context:
space:
mode:
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.patch152
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)