[Debian-hebrew-package] r1013 - in /pkg/libhdate/trunk/debian: changelog patches/clang.patch patches/series

kaplan at users.alioth.debian.org kaplan at users.alioth.debian.org
Mon Aug 17 15:32:48 UTC 2015


Author: kaplan
Date: Mon Aug 17 15:32:47 2015
New Revision: 1013

URL: http://svn.debian.org/wsvn/debian-hebrew/?sc=1&rev=1013
Log:
Fix FTBFS with clang instead of GCC (Closes: #758453).

Added:
    pkg/libhdate/trunk/debian/patches/clang.patch
Modified:
    pkg/libhdate/trunk/debian/changelog
    pkg/libhdate/trunk/debian/patches/series

Modified: pkg/libhdate/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/debian-hebrew/pkg/libhdate/trunk/debian/changelog?rev=1013&op=diff
==============================================================================
--- pkg/libhdate/trunk/debian/changelog	(original)
+++ pkg/libhdate/trunk/debian/changelog	Mon Aug 17 15:32:47 2015
@@ -1,3 +1,12 @@
+libhdate (1.6-3) unstable; urgency=medium
+
+  * Incorporate previous NMUs.
+  * Fix FTBFS with clang instead of GCC (Closes: #758453).
+    - Thanks Alexander Ovchinnikov.
+  * Thanking Baruch Even for his work on this package (Closes: #60005).
+
+ -- Lior Kaplan <kaplan at debian.org>  Mon, 17 Aug 2015 17:18:17 +0200
+
 libhdate (1.6-2.2) unstable; urgency=medium
 
   * Non-maintainer upload with maintainer's permission

Added: pkg/libhdate/trunk/debian/patches/clang.patch
URL: http://svn.debian.org/wsvn/debian-hebrew/pkg/libhdate/trunk/debian/patches/clang.patch?rev=1013&op=file
==============================================================================
--- pkg/libhdate/trunk/debian/patches/clang.patch	(added)
+++ pkg/libhdate/trunk/debian/patches/clang.patch	Mon Aug 17 15:32:47 2015
@@ -0,0 +1,245 @@
+Description: Fix FTBFS with clang instead of GCC
+Author: Alexander Ovchinnikov <sanek23994 at gmail.com>
+Bug-Debian: http://bugs.debian.org/758453
+
+--- a/examples/hcal/hcal.c
++++ b/examples/hcal/hcal.c
+@@ -677,13 +677,6 @@ void print_header_month_line_stdout( con
+ }
+ 
+ 
+-/**************************************************
+-*  print column headings for days of weeks
+-**************************************************/
+-void print_header_dow_line_stdout( const int colorize )
+-{
+-	int column;
+-
+ 	void print_dow_column( int column )
+ 	{
+ 		if (hdate_is_hebrew_locale())
+@@ -701,6 +694,13 @@ void print_header_dow_line_stdout( const
+ 		if (column != 7) printf ("  ");
+ 	}
+ 
++/**************************************************
++*  print column headings for days of weeks
++**************************************************/
++void print_header_dow_line_stdout( const int colorize )
++{
++	int column;
++
+ 	if (colorize) colorize_element(ELEMENT_WEEKDAY_NAMES);
+ 	for (column = 1; column < 7; column++) print_dow_column(column);
+ 	if (colorize) colorize_element(ELEMENT_SHABBAT_NAME);
+@@ -1149,27 +1149,15 @@ void print_week( int jd, const int month
+ 
+ 
+ 
+-/**************************************************
+-*  print month table
+-*************************************************/
+-int print_calendar ( const int current_month, const int current_year, const option_list opt)
+-{
+-	hdate_struct h;
+-	int calendar_line;
+-	int max_calendar_lines = 4;
+-	int previous_month, next_month;
+-	int previous_year, next_year;
+-	int jd_current_month, jd_previous_month, jd_next_month;
+-
+-	void how_many_calendar_lines( int month, int start_dow )
++void how_many_calendar_lines( int month, int start_dow, int *max_calendar_lines )
+ 	{
+ 		switch (month)
+ 		{
+ 		case  4:
+ 		case  6:
+ 		case  9:
+-		case 11:	if (start_dow == 7) max_calendar_lines = 6;
+-					else if (max_calendar_lines == 4) max_calendar_lines = 5;
++		case 11:	if (start_dow == 7) *max_calendar_lines = 6;
++					else if (*max_calendar_lines == 4) *max_calendar_lines = 5;
+ 					break;
+ 		case  1:
+ 		case  3:
+@@ -1177,12 +1165,24 @@ int print_calendar ( const int current_m
+ 		case  7:
+ 		case  8:
+ 		case 10:
+-		case 12:	if (start_dow > 5) max_calendar_lines = 6;
+-					else if (max_calendar_lines == 4) max_calendar_lines = 5;
++		case 12:	if (start_dow > 5) *max_calendar_lines = 6;
++					else if (*max_calendar_lines == 4) *max_calendar_lines = 5;
+ 					break;
+ 		}
+ 	}
+ 
++/**************************************************
++*  print month table
++*************************************************/
++int print_calendar ( const int current_month, const int current_year, const option_list opt)
++{
++	hdate_struct h;
++	int calendar_line;
++	int max_calendar_lines = 4;
++	int previous_month, next_month;
++	int previous_year, next_year;
++	int jd_current_month, jd_previous_month, jd_next_month;
++
+ 	/*********************************************************
+ 	*  Preliminaries:
+ 	*  - Find the first sunday(s) of each calendar
+@@ -1190,7 +1190,7 @@ int print_calendar ( const int current_m
+ 	*********************************************************/
+ 	hdate_set_gdate (&h, 1, current_month, current_year);
+ 	jd_current_month = h.hd_jd - h.hd_dw + 1;
+-	how_many_calendar_lines( h.gd_mon, h.hd_dw );
++	how_many_calendar_lines( h.gd_mon, h.hd_dw, &max_calendar_lines );
+ 
+ 	/*********************************************************
+ 	*  three months, side-by-side
+@@ -1212,7 +1212,7 @@ int print_calendar ( const int current_m
+ 		}
+ 		hdate_set_gdate (&h, 1, previous_month, previous_year);
+ 		jd_previous_month = h.hd_jd - h.hd_dw + 1;
+-		how_many_calendar_lines( h.gd_mon, h.hd_dw );
++		how_many_calendar_lines( h.gd_mon, h.hd_dw, &max_calendar_lines );
+ 
+ 		/*********************************************************
+ 		*  next month
+@@ -1229,7 +1229,7 @@ int print_calendar ( const int current_m
+ 		}
+ 		hdate_set_gdate (&h, 1, next_month, next_year);
+ 		jd_next_month = h.hd_jd - h.hd_dw + 1;
+-		how_many_calendar_lines( h.gd_mon, h.hd_dw );
++		how_many_calendar_lines( h.gd_mon, h.hd_dw, &max_calendar_lines );
+ 	}
+ 
+ 
+--- a/examples/hcal/local_functions.c
++++ b/examples/hcal/local_functions.c
+@@ -646,62 +646,50 @@ file. Attempting to create a config file
+ #include <sys/stat.h>
+ #include <sys/types.h>		// for mkdir,
+ 
+-/************************************************************
+-* Open config file, or create one
+-*  - returns filepointer or NULL
+-*  - if file does not exist, attempt to create it
+-************************************************************/
+-FILE* get_config_file(	const char* config_dir_name,
+-						const char* config_file_name,
+-						const char* default_config_file_text )
+-{
+-	size_t path_len;
+-
+-	char* config_home_path_name = "";
+-	char* config_sub_path_name = "";
+-
+-	char* config_dir_path;
+-	char* config_file_path;
+-
+-	FILE* config_file;
+ 
+ 	/************************************************************
+ 	* sub-function to get_config_file: create_config_file
+ 	************************************************************/
+-	void create_config_file()
++	void create_config_file(FILE** config_file, char* config_file_path,
++		const char* default_config_file_text, const char* config_file_name)
+ 	{
+-		config_file = fopen(config_file_path, "a");
+-		if (config_file == NULL)
++		*config_file = fopen(config_file_path, "a");
++		if (*config_file == NULL)
+ 		{
+ 			error(0, errno, "%s: %s", N_("failure attempting to create config file"), config_file_path);
+ 			return;
+ 		}
+-		fprintf(config_file, "%s", default_config_file_text);
++		fprintf(*config_file, "%s", default_config_file_text);
+ 		error(0,0,"%s: %s",N_("config file created"), config_file_path);
+-		if (fclose(config_file) != 0) error(0,errno,"%s %s",N_("failure closing"),config_file_name);
++		if (fclose(*config_file) != 0) error(0,errno,"%s %s",N_("failure closing"),config_file_name);
+ 	}
+ 
+ 	/************************************************************
+ 	* sub-function to get_config_file: open_config_file
+ 	************************************************************/
+-	int open_config_file()
++	int open_config_file(FILE** config_file, char* config_file_path,
++		size_t *path_len, const char* config_home_path_name,
++		const char* config_sub_path_name, const char* config_dir_name,
++		const char* default_config_file_text, const char* config_file_name)
+ 	{
+-		config_file = fopen(config_file_path, "r");
+-		if (config_file == NULL)
++		char* config_dir_path;
++
++		*config_file = fopen(config_file_path, "r");
++		if (*config_file == NULL)
+ 		{
+ 			if (errno != ENOENT) return FALSE;
+ 			// maybe replace all this with a single line asprintf()
+-			path_len = strlen(config_home_path_name)
++			*path_len = strlen(config_home_path_name)
+ 						+ strlen(config_sub_path_name)
+ 						+ strlen(config_dir_name) +1;
+-			if (path_len < 1) return FALSE;
+-			config_dir_path = malloc(path_len);
++			if (*path_len < 1) return FALSE;
++			config_dir_path = malloc(*path_len);
+ 			if (config_dir_path == NULL)
+ 			{
+ 				error(0,errno,"%s",N_("memory allocation failure"));
+ 				return FALSE;
+ 			}
+-			snprintf(config_dir_path, path_len, "%s%s%s",
++			snprintf(config_dir_path, *path_len, "%s%s%s",
+ 					config_home_path_name, config_sub_path_name,
+ 					config_dir_name);
+ 	
+@@ -712,13 +700,30 @@ FILE* get_config_file(	const char* confi
+ 				return FALSE;
+ 			}
+ 			greetings_to_version_16();
+-			create_config_file();
++			create_config_file(config_file, config_file_path, default_config_file_text, config_file_name);
+ 			free(config_dir_path);
+ 			return FALSE;
+ 		}
+ 		return TRUE;
+ 	}
+ 
++/************************************************************
++* Open config file, or create one
++*  - returns filepointer or NULL
++*  - if file does not exist, attempt to create it
++************************************************************/
++FILE* get_config_file(	const char* config_dir_name,
++						const char* config_file_name,
++						const char* default_config_file_text )
++{
++	size_t path_len;
++
++	char* config_home_path_name = "";
++	char* config_sub_path_name = "";
++
++	char* config_file_path;
++
++    FILE* config_file;
+ 
+ /************************************************************
+ * main part of function get_config_file
+@@ -750,7 +755,9 @@ FILE* get_config_file(	const char* confi
+ 			config_home_path_name, config_sub_path_name,
+ 			config_dir_name, config_file_name);
+ 
+-	if (open_config_file() == TRUE)
++	if (open_config_file(&config_file, config_file_path, &path_len, config_home_path_name,
++		config_sub_path_name, config_dir_name,
++		default_config_file_text, config_file_name) == TRUE)
+ 	{
+ 		free(config_file_path);
+ 		return config_file;

Modified: pkg/libhdate/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/debian-hebrew/pkg/libhdate/trunk/debian/patches/series?rev=1013&op=diff
==============================================================================
--- pkg/libhdate/trunk/debian/patches/series	(original)
+++ pkg/libhdate/trunk/debian/patches/series	Mon Aug 17 15:32:47 2015
@@ -9,3 +9,4 @@
 size_t.patch
 nested_extern.patch
 missing_format.patch
+clang.patch




More information about the Debian-hebrew-package mailing list