This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 06/10] Remove __need_list_t and __need_res_state.


On 05/09/2017 05:40 PM, Zack Weinberg wrote:
+#define LOCALDOMAINPARTS	2	/* min levels in name that is "local" */
+
+#define RES_TIMEOUT		5	/* min. seconds between retries */
+#define MAXRESOLVSORT		10	/* number of net to sort on */
+#define RES_MAXNDOTS		15	/* should reflect bit field size */
+#define RES_MAXRETRANS		30	/* only for resolv.conf/RES_OPTIONS */
+#define RES_MAXRETRY		5	/* only for resolv.conf/RES_OPTIONS */
+#define RES_DFLRETRY		2	/* Default #/tries. */
+#define RES_MAXTIME		65535	/* Infinity, in milliseconds. */
+
+struct __res_state {
+	int	retrans;		/* retransmition time interval */
+	int	retry;			/* number of times to retransmit */
+	unsigned long options;		/* option flags - see below. */
+	int	nscount;		/* number of name servers */
+	struct sockaddr_in
+		nsaddr_list[MAXNS];	/* address of name server */
+# define nsaddr	nsaddr_list[0]		/* for backward compatibility */

I suggest to keep all those #defines in <resolv/resolv.h>, purely to minimize recompilation if we add more macros here. This applies to RES_*, LOCALDOMAINPARTS and the nsaddr macro. MAXNS, MAXDFLSRCH, MAXDNSRCH can stay because we can't change them anyway.

Rest of the patch looks okay, but please verify that this does not affect stripped binaries.

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]