Hi,
Vidal Garza wrote:
[[...]]
I have a cuestion, where do you find the system header files error
number (61)?
I do that brute-force:
#! /bin/sh
#
# FGIN shell script to use "fgrep" on all
"/usr/include/....h" files
#
# $1, $2, ... options and arguments given to "fgrep"
#
# Simple example:
# FGIN seteuid return the line(s) in system header files where
# 'seteuid()' is defined or otherwise mentioned.
#
# 2004-09-13 Joerg Bruehe Initial "published" version
find /usr/include -follow -name '*.h' -print | xargs fgrep -n $*
This should work regardless of nested includes.
It is meant for any system definition, not just for error numbers,
that's why I do not restrict the list of file names.
If you are looking for an error number (as opposed to an identifier),
you may want to filter the output a bit, depending on your system's
conventions (example from LinuX):
The line you target for is
#define ECONNREFUSED 111 /* Connection refused */
but all you have is the 111 (the number).
1) "grep -n" in the script makes it write the line number, so you can
filter for : # define (tab or blank, any number) E
FGIN 111 | grep ':#define[ ]*E'
(the square bracket contains a blank and a tab).
On my system, this brings the output down from 926 lines (the 111
matches a postal code in the GPL comment !) to 9 lines.
2) If you are searching for error numbers, it is highly likely that the
file name contains "err":
FGIN 111 | grep '^[^:]*err'
(string "err" before the first colon). This returns 11 lines for me.
3) Combine the two, and it is only one hit (for me):
FGIN 111 | grep ':#define[ ]*E' | grep '^[^:]*err'
Try on your system, using 61.
HTH,
Joerg
--
Joerg Bruehe, Senior Production Engineer
MySQL AB, www.mysql.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]