From 6a3ca0d8d25125aee703f288a23798a31847dcdc Mon Sep 17 00:00:00 2001 From: antrik Date: Sat, 21 Mar 2009 02:00:35 +0100 Subject: New GSoC task: Fix PATH_MAX issues --- community/gsoc/project_ideas.mdwn | 1 + community/gsoc/project_ideas/maxpath.mdwn | 43 +++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 community/gsoc/project_ideas/maxpath.mdwn (limited to 'community/gsoc') diff --git a/community/gsoc/project_ideas.mdwn b/community/gsoc/project_ideas.mdwn index 7b8f9262..748f8855 100644 --- a/community/gsoc/project_ideas.mdwn +++ b/community/gsoc/project_ideas.mdwn @@ -96,3 +96,4 @@ will assist you as well as we can. [[inline pages="community/gsoc/project_ideas/debian_installer" show=0 feeds=no actions=yes]] [[inline pages="community/gsoc/project_ideas/download_backends" show=0 feeds=no actions=yes]] [[inline pages="community/gsoc/project_ideas/libgtop" show=0 feeds=no actions=yes]] +[[inline pages="community/gsoc/project_ideas/maxpath" show=0 feeds=no actions=yes]] diff --git a/community/gsoc/project_ideas/maxpath.mdwn b/community/gsoc/project_ideas/maxpath.mdwn new file mode 100644 index 00000000..73b4fa46 --- /dev/null +++ b/community/gsoc/project_ideas/maxpath.mdwn @@ -0,0 +1,43 @@ +[[meta copyright="Copyright © 2009 Free Software Foundation, Inc."]] + +[[meta license="""[[toggle id="license" text="GFDL 1.2+"]][[toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled +[[GNU_Free_Documentation_License|/fdl]]."]]"""]] + +[[meta title="Fixing Programs Using PATH_MAX et al Unconditionally"]] + +POSIX describes some constants (or rather macros) like PATH_MAX/MAXPATHLEN and +similar, which may be defined by the system to indicate certain limits. Many +people overlook the *may* though: Systems only should define them if they +actually have such fixed limits. The Hurd, following the GNU Coding Standards, +tries to aviod this kind of arbitrary limits, and consequently doesn't define +the macros. + +Many programs however just assume their presence, and use them unconditionally. +This is simply sloppy coding: not only does it violate POSIX and fails on +systems not defining the macros, but in fact most common use cases of these +macros are simply wrong! (See + for some +hints as to why this is so.) + +There are a few hundred packages in Debian GNU/Hurd failing to build because of +this -- simply grep for the offending macros in the +[list_of_build_failures](http://unstable.buildd.net/buildd/hurd-i386_Failed.html). + +Fixing these issues usually boils down to replacing `char foo[PATH_MAX]` by +`char *foo`, and using dynamic memory allocation. Sometimes this is tricky, but +more often not very hard. With a bit of practice, it should be easily possible +to fix several programs per day. + +The goal of this project is to fix the PATH_MAX and related problems in a +significant number of packages, and make the fixes ready for inclusion in +Debian and (where possible) upstream. No Hurd-specific knowledge is needed, nor +any other special knowledge aside from general C programming skills. + +Possible mentors: + +Exercise: Fix the PATH_MAX issues in some Debian package. -- cgit v1.2.3