Unix Programming - What's the purpose of these unused Macros?

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > May 2007 > What's the purpose of these unused Macros?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author What's the purpose of these unused Macros?
K-mart Cashier

2007-05-21, 7:26 pm

in the header file
#ifdef LOCK_LOCKF
#ifdef HAVE_SYS_LOCKING_H
#include <sys/lockf.h>
#endif
#ifdef HAVE_SYS_LOCKING_H
#include <sys/file.h>
#endif
#define fseek(file, 0L, 0, lockf(file, 1, 0L)
#define fseek(file, 0L, 0, lockf(file, 0, 0L)
#endif /* LOCK_LOCKF */

#ifdef LOCK_NONE
#define LOCK(file)
#define UNLOCK(file)
#endif /*LOCK_NONE*/

When I grepped both LOCK_LOCKF and LOCK_NONE, these macros only showed
up in config.h.in, configure.in, and the header file in question.

Why would the author go through the effort of defining these macros if
he doesn't use them throughout the rest of the program?

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com