--- sane-backends-1.0.19/backend/plustek-usb.h	Mon Dec 17 06:28:13 2007
+++ sane-backends-1.0.19/backend/plustek-usb.h	Mon May 30 19:25:08 2011
@@ -130,22 +130,28 @@
 #define _PHILO2WORD(x)  ((u_short)x->bHi * 256U + x->bLo)
 #define _PLOHI2WORD(x)  ((u_short)x->bLo * 256U + x->bHi)
 
-#define PACKED8  __attribute__ ((packed,aligned(1)))
-#define PACKED16 __attribute__ ((packed,aligned(2)))
+/* change to use Sun Studio CC */
 
+/* #define PACKED8  __attribute__ ((packed,aligned(1))) */
+/* #define PACKED16 __attribute__ ((packed,aligned(2))) */
+
+#pragma pack(1)
 /* useful for RGB-values */
 typedef struct {
 	u_char Red;
 	u_char Green;
 	u_char Blue;
-} PACKED8 RGBByteDef;
+} /*PACKED8*/ RGBByteDef;
 
+#pragma pack(2)
 typedef struct {
 	u_short Red;
 	u_short Green;
 	u_short Blue;
-} PACKED16 RGBUShortDef;
+} /*PACKED16*/ RGBUShortDef;
 
+#pragma pack()
+
 typedef struct {
 	u_long Red;
 	u_long Green;
@@ -152,25 +158,29 @@
 	u_long Blue;
 } RGBULongDef;
 
+#pragma pack(1)
 typedef struct {
 	u_char a_bColor[3];
-} PACKED8 ColorByteDef;
+} /*PACKED8*/ ColorByteDef;
 
 typedef struct {
 	u_char bHi;
 	u_char bLo;
-} PACKED8 HiLoDef;
+} /*PACKED8*/ HiLoDef;
 
+#pragma pack(2)
 typedef union {
 	HiLoDef HiLo[3];
 	u_short Colors[3];
-} PACKED16 ColorWordDef;
+} /*PACKED16*/ ColorWordDef;
 
 typedef union {
 	HiLoDef HiLo;
 	u_short Mono;
-} PACKED16 MonoWordDef;
+} /*PACKED16*/ MonoWordDef;
 
+#pragma pack()
+
 typedef union {
 
 	u_char       *pb;
@@ -182,7 +192,7 @@
 	RGBUShortDef *pw_rgb;
 	HiLoDef      *philo;
 
-} __attribute__ ((aligned(4)))  AnyPtr;
+} /*__attribute__ ((aligned(4)))*/  AnyPtr;
 
 typedef struct {
 	unsigned short x;
--- sane-backends-1.0.19/backend/hp5590_cmds.c	Wed Nov 28 03:43:39 2007
+++ sane-backends-1.0.19/backend/hp5590_cmds.c	Mon May 30 19:25:06 2011
@@ -154,6 +154,9 @@
 #define CMD_START_SCAN		0x051b
 #define CMD_BUTTON_STATUS	0x0020
 
+/* change attribute keyword to #pragma to use Sun Studio */
+
+#pragma pack(1)
 struct init_resp
 {
   u_int8_t 	flags;			/* bit 0 - TMA, bit 1 - ADF, bit 3 - LCD present */
@@ -167,13 +170,13 @@
   u_int8_t 	pad2[8];		/* 00 00 00 00 00 00 00 00 */
   u_int16_t 	motor_param_normal;	/* 00 64 = 100 */
   u_int16_t 	motor_param_max;	/* 03 E8 = 1000 */
-} __attribute__ ((packed));
+}; /* __attribute__ ((packed)); */
 
 struct power_resp
 {
   u_int8_t flags;
   u_int16_t unk1;
-} __attribute__ ((packed));
+}; /* __attribute__ ((packed)); */
 
 /* 
  * 215.9 mm x 297.2 mm
@@ -347,7 +350,7 @@
 				 *
 				 * bw 1200                              : 04 f5 =  1269
 				 */
-} __attribute__ ((packed));
+}; /*__attribute__ ((packed)); */
 
 struct image_params
 {
@@ -395,7 +398,7 @@
   u_int16_t line_width;
   u_int16_t real_size_y;
   u_int32_t pad3;		/* 00 00 00 00 */
-} __attribute__ ((packed));
+}; /*__attribute__ ((packed));*/
 
 struct lamp_state
 {
@@ -402,7 +405,7 @@
   u_int8_t	unk1;		/* 02 */
   u_int8_t 	flag;		/* 01 on start, 02 - TMA, 03 - all other */
   u_int16_t 	turnoff_time;	/* 0a 0a, 03 36, 0f 36 */
-} __attribute__ ((packed));
+};/* __attribute__ ((packed));*/
 
 struct color_map
 {
@@ -409,7 +412,7 @@
   u_int8_t 	color1[6];	/* 00 00 00 00 01 00 */
   u_int8_t 	color2[6];	/* 00 00 00 00 01 00 */
   u_int8_t 	color3[6];	/* 00 00 00 00 01 00 */
-} __attribute__ ((packed));
+};/* __attribute__ ((packed)); */
 
 struct reg_03
 {
@@ -416,8 +419,10 @@
   u_int8_t 	unk1;		/* 0x0b - ADF ready, 0x03 - not */
   u_int8_t 	unk2;		/* 0x80 */
   u_int8_t 	adf_flags;	/* 0x01 - ADF ready when selected, 0x02 - not */
-} __attribute__ ((packed));
+};/* __attribute__ ((packed));*/
 
+#pragma pack()
+
 /******************************************************************************/
 static SANE_Status
 hp5590_vendor_product_id (enum hp_scanner_types scanner_type,
--- sane-backends-1.0.19/backend/hp5590_low.c	Sat Feb  2 23:47:55 2008
+++ sane-backends-1.0.19/backend/hp5590_low.c	Mon May 30 19:25:07 2011
@@ -65,12 +65,14 @@
   return SANE_STATUS_INVAL; \
 }
 
+/* change attribute keyword to #pragma to use Sun Studio */
+#pragma pack(1)
 /* Structure describing bulk transfer size */
 struct bulk_size
 {
   u_int16_t	size;
   u_int8_t 	unused;
-} __attribute__ ((packed));
+}; /* __attribute__ ((packed));*/
 
 /* Structure describing bulk URB */
 /* FIXME: Verify according to USB standard */
@@ -82,7 +84,7 @@
   u_int16_t	unknown;
   u_int16_t	wLength;
   u_int8_t 	pad;
-} __attribute__ ((packed));
+}; /* __attribute__ ((packed)); */
 
 /* Structure describing control URB */
 struct usb_in_usb_ctrl_setup {
@@ -91,8 +93,10 @@
   u_int16_t wValue;
   u_int16_t wIndex;
   u_int16_t wLength;
-} __attribute__ ((packed));
+}; /* __attribute__ ((packed)); */
 
+#pragma pack()
+
 /* CORE status flag - ready or not */
 #define CORE_FLAG_NOT_READY		1 << 1
 
--- sane-backends-1.0.19/doc/sane-mustek_pp.man	Sun Feb 11 09:36:31 2007
+++ sane-backends-1.0.19/doc/sane-mustek_pp.man	Mon May 30 19:25:09 2011
@@ -422,7 +422,7 @@
 levels reduce verbosity.
 .sp
 .TS
-lb lb;
+lb lb
 l l.
 level	debug output
 -	-
@@ -441,7 +441,7 @@
 million lines of debug output.
 .sp
 .TS
-lb lb;
+lb lb
 l l.
 level	debug output
 -	-
--- sane-backends-1.0.19/backend/Makefile.in	Fri May 20 00:42:26 2011
+++ sane-backends-1.0.19/backend/Makefile.in	Fri May 20 01:38:02 2011
@@ -208,6 +208,32 @@
   umax1220u.c umax1220u-common.c umax1220u.conf.in \
   v4l.c v4l.conf.in v4l-frequencies.h v4l.h
 
+BACKEND_CONFS =  abaton.conf agfafocus.conf apple.conf \
+  artec.conf artec_eplus48u.conf avision.conf \
+  bh.conf canon.conf canon630u.conf \
+  canon_pp.conf cardscan.conf coolscan.conf \
+  coolscan2.conf dc210.conf dc240.conf \
+  dc25.conf dell1600n_net.conf dll.conf \
+  dmc.conf epjitsu.conf epson.conf \
+  epson2.conf fujitsu.conf genesys.conf \
+  gphoto2.conf gt68xx.conf hp.conf \
+  hp3900.conf hp4200.conf hp5400.conf \
+  hpsj5s.conf hs2p.conf ibm.conf \
+  leo.conf lexmark.conf ma1509.conf \
+  matsushita.conf microtek.conf microtek2.conf \
+  mustek.conf mustek_pp.conf mustek_usb.conf \
+  nec.conf net.conf pie.conf \
+  plustek.conf plustek_pp.conf qcam.conf \
+  ricoh.conf s9036.conf saned.conf \
+  sceptre.conf sharp.conf sm3840.conf \
+  snapscan.conf sp15c.conf st400.conf \
+  stv680.conf tamarack.conf teco1.conf \
+  teco2.conf teco3.conf test.conf \
+  u12.conf umax.conf umax1220u.conf \
+  umax_pp.conf v4l.conf \
+
+SUFFIXES = .conf.in .conf
+
 .PHONY: all clean depend dist distclean install uninstall
 
 libsane-%.la: %.lo %-s.lo $(EXTRA) $(LIBOBJS)
@@ -231,6 +257,9 @@
 
 all:	$(LIBS) libsane.la becfg
 
+.SUFFIXES:
+.SUFFIXES: .conf.in .conf
+
 install: $(INSTALL_LOCKPATH) install-be@BE_INSTALL_FLAVOR@ install-libsane install-becfg
 
 install-be:
@@ -323,8 +352,8 @@
 		-rpath $(libdir) -version-info $(V_MAJOR):$(V_REV):$(V_MINOR)
 
 # Generate .conf files for all existing .conf.in files
-becfg: $(patsubst %.conf.in,%.conf,$(wildcard *.conf.in)) 
-%.conf: %.conf.in
+becfg: $(BACKEND_CONFS)
+.conf.in.conf:
 	@echo Generating $@ from $^
 	@sed -e 's|@DATADIR@|$(datadir)|g' \
 	     -e 's|@CONFIGDIR@|$(configdir)|g' \
--- sane-backends-1.0.19/tools/Makefile.in	Thu May 19 17:46:16 2011
+++ sane-backends-1.0.19/tools/Makefile.in	Thu May 19 18:24:03 2011
@@ -110,7 +110,7 @@
 	@$(LIBTOOL) $(MLINK) $(LINK) gamma4scanimage.o -lm
 
 ../backend/umax_pp_low.o: ../backend/umax_pp_low.c 
-	$(COMPILE) ../backend/umax_pp_low.c -o ../backend/umax_pp_low.o \
+	$(COMPILE) $< -o ../backend/umax_pp_low.o \
 	  -DBACKEND_NAME=umax_pp_low
 
 umax_pp: umax_pp.o ../backend/umax_pp_low.o
@@ -119,23 +119,26 @@
 sane-desc: sane-desc.o
 	@$(LIBTOOL) $(MLINK) $(LINK) sane-desc.o $(LIBSANEI) $(LIBLIB)
 
-hotplug/libsane.usermap: $(wildcard ${top_srcdir}/doc/descriptions/*.desc) $(wildcard ${top_srcdir}/doc/descriptions-external/*.desc) sane-desc
+hotplug/libsane.usermap: $(wildcard ${top_srcdir}/doc/descriptions/*.desc) $(wildcard ${top_srcdir}/doc/descriptions-external/*.desc) sane-desc | output-dir
 	@./sane-desc -m usermap -s ${top_srcdir}/doc/descriptions:${top_srcdir}/doc/descriptions-external \
 	   -d 1 > $@
 
-hotplug-ng/libsane.db: $(wildcard ${top_srcdir}/doc/descriptions/*.desc) $(wildcard ${top_srcdir}/doc/descriptions-external/*.desc) sane-desc
+hotplug-ng/libsane.db: $(wildcard ${top_srcdir}/doc/descriptions/*.desc) $(wildcard ${top_srcdir}/doc/descriptions-external/*.desc) sane-desc | output-dir
 	@./sane-desc -m db -s ${top_srcdir}/doc/descriptions:${top_srcdir}/doc/descriptions-external \
 	   -d 0 > $@
 
-udev/libsane.rules: $(wildcard ${top_srcdir}/doc/descriptions/*.desc) $(wildcard ${top_srcdir}/doc/descriptions-external/*.desc) sane-desc
+udev/libsane.rules: $(wildcard ${top_srcdir}/doc/descriptions/*.desc) $(wildcard ${top_srcdir}/doc/descriptions-external/*.desc) sane-desc | output-dir
 	@./sane-desc -m udev -s ${top_srcdir}/doc/descriptions:${top_srcdir}/doc/descriptions-external \
 	   -d 0 > $@
 
-hal/libsane.fdi: $(wildcard ${top_srcdir}/doc/descriptions/*.desc) $(wildcard ${top_srcdir}/doc/descriptions-external/*.desc) sane-desc
+hal/libsane.fdi: $(wildcard ${top_srcdir}/doc/descriptions/*.desc) $(wildcard ${top_srcdir}/doc/descriptions-external/*.desc) sane-desc | output-dir
 	@./sane-desc -m hal -s ${top_srcdir}/doc/descriptions:${top_srcdir}/doc/descriptions-external \
 	   -d 0 > $@
 
+output-dir:
+	mkdir hotplug hotplug-ng udev hal
 
+
 depend:
 	makedepend $(INCLUDES) *.c 2>/dev/null
 
