[rfc] Remove sys_quotactl define on i386 targets

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[rfc] Remove sys_quotactl define on i386 targets

Ulrich Weigand
Hello,

for the i386-linux target, both the TM file and configure.ac (for the
native case) define sys_quotactl to "work around a problem with
/usr/include/sys/procfs.h".  This code is in the tree for at least
10 years now.  I was unable to determine what that "problem" was;
in any case it appears to be long gone.

The following patch removes this define without any apparent adverse
effect.  It also removes the configure.ac definition of
START_INFERIOR_TRAPS_EXPECTED to 2, as this is the default anyway.

Tested on i386-linux.

I'd like to commit this to get rid of one more weird TM define --
does anyone still remember the background of this problem?

Bye,
Ulrich

ChangeLog:

        * config/i386/tm-linux.h (sys_quotactl): Do not define.
        * configure.ac (sys_quotactl, START_INFERIOR_TRAPS_EXPECTED): Do not
        define for i[[3456]]86-*-linux* native configurations.
        * config.in, configure: Regenerate.

diff -urNp gdb-orig/gdb/config/i386/tm-linux.h gdb-head/gdb/config/i386/tm-linux.h
--- gdb-orig/gdb/config/i386/tm-linux.h 2007-05-12 01:09:46.956211000 +0200
+++ gdb-head/gdb/config/i386/tm-linux.h 2007-05-12 01:12:41.706689899 +0200
@@ -23,9 +23,6 @@
 #ifndef TM_LINUX_H
 #define TM_LINUX_H
 
-/* The following works around a problem with /usr/include/sys/procfs.h  */
-#define sys_quotactl 1
-
 /* N_FUN symbols in shared libaries have 0 for their values and need
    to be relocated. */
 #define SOFUN_ADDRESS_MAYBE_MISSING
diff -urNp gdb-orig/gdb/config.in gdb-head/gdb/config.in
--- gdb-orig/gdb/config.in 2007-04-19 02:34:07.000000000 +0200
+++ gdb-head/gdb/config.in 2007-05-12 01:05:48.000000000 +0200
@@ -551,9 +551,6 @@
  STACK_DIRECTION = 0 => direction of growth unknown */
 #undef STACK_DIRECTION
 
-/* Define on a GNU/Linux system to work around problems in sys/procfs.h. */
-#undef START_INFERIOR_TRAPS_EXPECTED
-
 /* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
 #undef STAT_MACROS_BROKEN
 
@@ -615,8 +612,5 @@
 /* Define to `int' if <sys/types.h> does not define. */
 #undef pid_t
 
-/* Define on a GNU/Linux system to work around problems in sys/procfs.h. */
-#undef sys_quotactl
-
 /* Define as `fork' if `vfork' does not work. */
 #undef vfork
diff -urNp gdb-orig/gdb/configure gdb-head/gdb/configure
--- gdb-orig/gdb/configure 2007-05-12 01:09:46.867223000 +0200
+++ gdb-head/gdb/configure 2007-05-12 01:17:37.380987518 +0200
@@ -19277,24 +19277,10 @@ _ACEOF
 
 fi
 
-# If we are configured native on GNU/Linux, work around problems with
-# sys/procfs.h
-# Also detect which type of /proc is in use, such as for Unixware or Solaris.
+# Detect which type of /proc is in use, such as for Unixware or Solaris.
 
 if test "${target}" = "${host}"; then
   case "${host}" in
-  i[3456]86-*-linux*)
-
-cat >>confdefs.h <<\_ACEOF
-#define START_INFERIOR_TRAPS_EXPECTED 2
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define sys_quotactl 1
-_ACEOF
-
- ;;
   *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
 
 cat >>confdefs.h <<\_ACEOF
diff -urNp gdb-orig/gdb/configure.ac gdb-head/gdb/configure.ac
--- gdb-orig/gdb/configure.ac 2007-05-12 01:09:46.913217000 +0200
+++ gdb-head/gdb/configure.ac 2007-05-12 01:12:41.662696222 +0200
@@ -686,18 +686,10 @@ if test $gdb_cv_have_pt_getxmmregs = yes
   [Define if sys/ptrace.h defines the PT_GETXMMREGS request.])
 fi
 
-# If we are configured native on GNU/Linux, work around problems with
-# sys/procfs.h
-# Also detect which type of /proc is in use, such as for Unixware or Solaris.
+# Detect which type of /proc is in use, such as for Unixware or Solaris.
 
 if test "${target}" = "${host}"; then
   case "${host}" in
-  i[[3456]]86-*-linux*)
- AC_DEFINE(START_INFERIOR_TRAPS_EXPECTED, 2,
-        [Define on a GNU/Linux system to work around problems in sys/procfs.h.])
- AC_DEFINE(sys_quotactl, 1,
-        [Define on a GNU/Linux system to work around problems in sys/procfs.h.])
- ;;
   *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
       AC_DEFINE(NEW_PROC_API, 1,
       [Define if you want to use new multi-fd /proc interface
--
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: [rfc] Remove sys_quotactl define on i386 targets

Daniel Jacobowitz-2
On Sat, May 12, 2007 at 02:22:41AM +0200, Ulrich Weigand wrote:

> Hello,
>
> for the i386-linux target, both the TM file and configure.ac (for the
> native case) define sys_quotactl to "work around a problem with
> /usr/include/sys/procfs.h".  This code is in the tree for at least
> 10 years now.  I was unable to determine what that "problem" was;
> in any case it appears to be long gone.
>
> The following patch removes this define without any apparent adverse
> effect.  It also removes the configure.ac definition of
> START_INFERIOR_TRAPS_EXPECTED to 2, as this is the default anyway.
>
> Tested on i386-linux.
>
> I'd like to commit this to get rid of one more weird TM define --
> does anyone still remember the background of this problem?

No one seems to; I think you should commit the patch.

--
Daniel Jacobowitz
CodeSourcery
Reply | Threaded
Open this post in threaded view
|

Re: [rfc] Remove sys_quotactl define on i386 targets

Ulrich Weigand
Daniel Jacobowitz wrote:

> On Sat, May 12, 2007 at 02:22:41AM +0200, Ulrich Weigand wrote:
> > Hello,
> >
> > for the i386-linux target, both the TM file and configure.ac (for the
> > native case) define sys_quotactl to "work around a problem with
> > /usr/include/sys/procfs.h".  This code is in the tree for at least
> > 10 years now.  I was unable to determine what that "problem" was;
> > in any case it appears to be long gone.
> >
> > The following patch removes this define without any apparent adverse
> > effect.  It also removes the configure.ac definition of
> > START_INFERIOR_TRAPS_EXPECTED to 2, as this is the default anyway.
> >
> > Tested on i386-linux.
> >
> > I'd like to commit this to get rid of one more weird TM define --
> > does anyone still remember the background of this problem?
>
> No one seems to; I think you should commit the patch.

OK, I've committed this now.

Thanks,
Ulrich

--
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  [hidden email]